Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Journey planning project

Go to End

3 Posts   921 Views


Community Member, 7 Posts

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.

I'm doing this in SilverStripe (rather than a standalone JavaScript widget) as I'd like it to be easy for the end user to add/remove Start and End Points as they like.

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!


Community Member, 116 Posts

17 April 2012 at 2:07pm

Hey Mundek,

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:

- Journey
- 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.



Community Member, 7 Posts

17 April 2012 at 2:58pm

Hi Novaweb,

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.