22851 Posts in 9934 Topics by 2804 members
|Go to End|
17 April 2012 at 1:01pm
So, I've read some documentation, worked through the tutorials and I'm ready to start my first SilverStripe project!
I'd like to put this out to the community and see how others would approach it, I don't expect code snippets or anything but high level 'start here' help would be good. I'm new to SilverStripe but I'm comfortable with PHP and have used Drupal extensively.
What I'm trying to achieve:
I'm developing a website for a someone that runs a shuttlebus service to and from their accommodation (and other points) at scheduled times. I'd like to be able to give visitors to the site a 'journey planner' to help them plan their bus/flight connections.
A user would select a Start Point from a dropdown, then an End Point from a dropdown, click submit and matching departure and arrival times would be displayed (or a message stating no matching journeys were found).
So far I've got two data objects -
1) Start Point
Fields - name, description, departure times (e.g 10am, 1pm, 4pm)
2) End Point
Fields - name, description, arrival times (e.g. 11am, 2pm, 4pm)
- A Start Point will always have an End Point.
- Any given Start Point can have multiple different End Points. e.g. I can start at Point A and travel to Point B, or I can travel from Point A to Point C or even Point B to Point C.
In Drupal I'd probably create a Start/End Point content type in CCK, then use nodereference to create the linkages and some sort of View to display the results.
Hope that makes sense. Thanks in advance for any tips!
17 April 2012 at 2:07pm
Hell of a concept to tackle for your first SilverStripe project! Without putting too much time in to it:
In my opinion you should be having three DataObjects:
- Waypoint (if you include GPS Coordinates in this DataObject, you could integrate Google Maps using their API)
- WaypointSchedule (here you would have Time and TravelDirection)
A Journey has_many Waypoints. Waypoints has_many WaypointSchedules
The Journey, Waypoints and WaypointShedule DataObjects would be predefined by your client and loaded in to the CMS. This would match the client's timetable/direction of travel.
Users of the site would then query the detail and that query would compare with client's data to the database and return the results that match best.
Set aside a good amount of time to get this working!
Others feel free to elaborate or challenge the concept above, not 100% certain it will work as intended.
17 April 2012 at 2:58pm
Thanks for the reply, yep it's a big job but I figured it's a good learning opportunity (plus the client is my brother so I can afford to spend a bit of time on it!)
I had thought about including coordinates and using Google Maps, but probably won't tackle this straight away.
The DataObjects suggested sound like good starting points, I'll mull them over.
|Go to Top|