Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Website request processing

Featured Replies

I have a real problem with processing requests. I am designing an Intranet and website for work. Its a small company so the two projects will give me a lot of experience. However, I have a stumbling block of how to process page requests. For example, to create a new project I would have one request to view the form to input details and another request to process the data on that form, for example project.php?request=create to display the form and project.php?request=processcreate to sort out the data on the form.

 

However, how do I process these in terms of layout and structure? I have come up with the following:

 

- A massive switch statement that direct requests to class functions. This is impractical and hard to maintain.

- A series of switch statements in various files that direct requests to class functions. Fairly similar to the above but easier because files can be split into various groups according to what purpose they serve.

- A completely class based system, going through a hierarchy of classes, but based on smaller switch statements within class constructors. This is the one I'm thinking of using at the moment. Everything will have one entry point, which will parse the request and pass to the appropriate class constructor. E.g. if the first part of the request contains "project" the project class constructor is called, which then parses other elements in the request and applies the appropriate action. To me this idea is simpler to edit than scrolling through a massive switch statement.

 

 

I just don't know how to handle the varying requests and have no experience in designing something of this magnitude, although I'll be fine with coding. I'd like to use classes as thats what I'm familiar with from C# and C++. All suggestions are welcome.

  • Author
Have you thought about running with an open source CMS system?

 

I would rather not. The whole point of the exercise is to make my own and gain experience from it. However, could you recommend any open source systems that I could use to get some ideas from?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.