Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

MVC form over convention

Options
  • 22-03-2011 7:38pm
    #1
    Registered Users Posts: 2,781 ✭✭✭


    I am developing a site using a MVC model (want to learn it ).

    It will be used for displaying range of static data with no user input.

    I will have various different categories such as schools.

    Have you hava URL like
    schools/primary

    or

    schoolsprimary?

    when accessing the schools would you use
    id.php
    or
    myschoolname.php

    all comments appreciated.

    I'm divided 50/50


Comments

  • Registered Users Posts: 981 ✭✭✭fasty


    Will you have primary and secondary schools?

    If so, I'd call the controller Schools then for viewing schools in each category I would use:

    Schools/CategoryName

    Regarding the id or name. I always have a hard time deciding on this myself. I use ASP.Net MVC so in the end I made routes to refer to record by id or name but just stuck with the id in the end.

    If you're rolling your own URL router you might not be at that stage yet, so I guess go for ids for now and change it later? Really, it's up to you.


  • Registered Users Posts: 2,781 ✭✭✭amen


    yes primary and secondary schools.

    Yeah using ASP.Net MVC.

    Haven't got as far as url yet


Advertisement