Jump to content

Recommended Posts

Ok usually i use a combination of procedural and OO. But i want to build my next project completely in OO to  x out a couple of things for school and to make the whole thing more maintainable for future usage

 

Currently I am building a reservation website where you can book hotels, flights and package deals. the package deals are flights combined with a hotel reservation.

The diagram looks like this so far

ClassDiagram1.png

 

If i am to make this thing completely OO where would i put the search hotels method and the search flights. I am probably supose to create new objects for this.

anyone has any ideas on this. any comment is welcome

 

thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/116003-class-diagram/
Share on other sites

There are various ways you could do that. If you are using the MVC pattern then you would probably have a search action in your respective controllers.

 

It looks like database schema, not a class diagram  ...

It's a UML class diagram, but seeing as the diagram depicts models you are partially right that it is also a database schema.

Link to comment
https://forums.phpfreaks.com/topic/116003-class-diagram/#findComment-596941
Share on other sites

Yes, it is UML, but diagram should contain methods for CRUD and other operations, not only list of table fields.

I know it looks like a ER diagram it hasn't been filled with all the methods yet its just a sketch of what i want to build

The database actually looks like that only that you cant store an object airport into flights for just an example

 

There are various ways you could do that. If you are using the MVC pattern then you would probably have a search action in your respective controllers.

I've bumped into the term MVC a couple times and I did a little searching on it i am however very knew to it. The MVC is prob also the way most Java programmers do it . Any good links about the MVC approach besides Google. Another aproach would be to just instantiate a list of objects on requested php page but that would most likely be ugly

Link to comment
https://forums.phpfreaks.com/topic/116003-class-diagram/#findComment-597354
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.