URL routing lets you configure an application to accept request URLs that do not map to physical files.
1
vote
1answer
35 views
Uri Routing PHP Code
I do programing with core php & i don't want to like use any cms or mvc framework. if any handy ideas then welcome it.
index.php file
...
2
votes
0answers
29 views
PHP routing system
I made a routing system for PHP inspired by Symfony's router composed of a few classes.
First I am using Symfony's HTTP Foundations component.
Then, I am emulating the classes in the routing ...
5
votes
2answers
266 views
As basic as routing in PHP can get
I'd like to have neater URLs, no more and no less — I'd like to be able to write /page/subpage instead of something like ...
4
votes
1answer
113 views
PHP Route class
I was trying to keep it SRP. I'm new into PHP OOP and I'm wondering how I can make it better.
Route.php
...
0
votes
0answers
62 views
Routing through controller's file name
Before I started learning Node.js I was happy doing my projects with PHP codeigniter. When I learned Node.js, I tried to implement the routing mechanism codeigniter use by looking up controllers file ...
5
votes
2answers
102 views
Simple JavaScript router with params
I am building a JS router and would like to have some help doing it. It will work like so:
A list of routes is given with a URL pattern attached in each one.
...
3
votes
1answer
141 views
Creating an object-oriented router class in PHP
On my way to learn OOP, I am developing a little CMS using the MVC pattern. I would like to have some feedback about my router class, mostly about if I am correctly using OOP.
Right now, I have a ...
5
votes
0answers
52 views
Router to match URL to Controller Method
I wrote a router class which accepts a URL and calls the appropriate controller method based on it.
I'm a little worried about the amount of dependencies it has (eg ...
5
votes
0answers
129 views
AngularJs Module Run Block, Configuration, and Route Definition
My AngularJs app is currently working fine. I'm working on modularity, refining my code design, and making it more readable. I have a app.js file that contains the ...
3
votes
2answers
74 views
CakePHP static pages (without entity) but with dynamic content
I have a few pages that is not connected with entities (index page, terms of use page, email page).
Detailed description: In CakePHP, when you want to have a static page (such as index for example), ...
4
votes
2answers
81 views
Gathering tokens from ASP.NET routes
This is one of the (many) utilitarian classes I have that I use with my ASP.NET sites.
The basis of this one is to make gathering certain tokens that I use periodically, to make URL's more friendly.
...
5
votes
3answers
70 views
UrlRouter which uses regular expressions to find out what to do
I have created UrlRouter. It should call appropriate controllers methods with extracted values as a parameters. It works fine, but my boss told me that I should ...
4
votes
2answers
75 views
Dissecting URLs
For the request object in my PHP application, I need to dissect the URL and assign its components to class attributes (module, controller, method and the rest are parameters). Currently, I'm doing it ...
1
vote
1answer
32 views
Is dynamically generating routes from Model enum safe?
I am generating routes and responding to it dynamically by looking at the enum defined in the model. Is this safe and is there more proper method?
...
1
vote
1answer
100 views
Routes for a user controller in a Node.js application
I have a very simple Node application that routes requests to /users to the following file:
users.js
...
5
votes
1answer
251 views
Small PHP-MVC system (for personal learning / use)
I've made an "simple" / "small" MVC-like PHP system. I've used some code of an project I used before and ask questions about it back then to.
The thing is, it works (the admin part to begin with), ...
3
votes
0answers
1k views
Simple Router class
I made a simple routing class that I like to get reviews for, mostly because I do not know how to make it SOLID, since I even made this class separate from the HTTP response/request for the sake of ...
0
votes
1answer
117 views
0
votes
1answer
104 views
Properly Structured Angular Application
I've been writing a somewhat complicated service that involves a lot of API function calls in Angular. After a somewhat tortured first attempt I have tried to take more of an MVC approach rewritten ...
3
votes
0answers
137 views
PHP MVC Service Layer Role
I wrote a series of questions in a previous post, and a user recommended that I separate the questions.
I have made the switch from procedural programming to object-oriented programming. I have ...
2
votes
1answer
124 views
PHP MVC simple controller design
I am currently rewriting a legacy PHP4 application to a MVC-style object-oriented one.
As the most complex part is the models, I came up with the following controller-view scheme. I wanted to use only ...
2
votes
1answer
81 views
Parameterized route
Is this approach considered good practice, or should I create separate router.delete functions for all my routes? Please, explain why.
...
2
votes
1answer
402 views
Implementation of MVC Bootstrap & Factory
Before I get started, I feel I need to list the following.
I am not looking for an existing DI or Framework this is a personal project to shift from procedural to oop programming.
Tear this apart. ...
2
votes
1answer
354 views
Unit tests for a Laravel site
Is this Test Case overkill?
I am new to Unit Testing so I am learning and I'd love to hear your opinion about it.
...
4
votes
1answer
1k views
N-layered application structure in ASP.NET MVC 5
I've been trying to set up an n-layered application in ASP.NET MVC 5. I've converted my account controller to look like this.
I would like some feedback as to whether this is going in the right ...
2
votes
1answer
637 views
Extending the MVC Routecollection
I'm currently developping an MVC framework on which I will be writing my websites. This is done through the usage of a starter kit.
In standard MVC, your routes are registered like the following:
...
2
votes
1answer
129 views
Redirecting to a file
I've been learning how to code for the past three years. I have made some really good progress I think, and right now I'm trying myself on creating an MVC framework.
I found this awesome idea on ...
4
votes
2answers
145 views
Would this be considered MVC?
For many days, I've been re-designing my application, applying some custom pattern and making our code looks like a framework. I have something like this for separate the business logic, from views:
...
4
votes
2answers
967 views
PHP Router for MVC
I recently started developing my first serious project in PHP, a MVC completely build by myself, which is quite a challenge, when being new to OOP.
So the main struggle of the whole project has, and ...
0
votes
1answer
94 views
URL router that loads dependent objects
How can I write my code more efficient (not repeating same code)?
And is there a solution that simplifies the way of having to create a lot of dependency objects over and over again whenever I ...
2
votes
1answer
137 views
Micro MVC framework
I'm building my own micro MVC framework with only the absolute core functionality. My router will call the controller depending on the request method (GET or POST), and if the called action isn't ...
3
votes
1answer
151 views
Routing the CMS way
I always been curious on how to build great application with proper routing to my controllers, but after seeing some sources of applications like Xenforo, Joomla, it seems completely different, and ...
3
votes
1answer
434 views
Router for MVC framework
The class routes URLs based on the domain.com/class/method/param/.. format. It also checks the request type (GET or POST) and calls the method name GET or POST from ...
5
votes
1answer
138 views
Preprocessing Markdown Documents for Keywords
I recently added a feature to my application to serve arbitrary markdown documents from a directory. This is designed to allow authors to populate a folder full of help documents, and be able to view ...
5
votes
1answer
283 views
MVC4 Routes, using Default
Should I leave the Default Route in if it's not adding any benefit?
I have a RouteConfig.cs file that looks like this:
...
5
votes
1answer
1k views
PHP router class
I'm writing yet another MVC framework just for learning purposes and I would like you to review my code. Whenever I'm coding, I have that feeling that my code is horrible and is not the most efficient ...
2
votes
1answer
946 views
Backbone Router
I am thinking of writing some online notes/book. Amongst other things, I want
to use Backbone to show different sections within a chapter as separate views.
In other words, I want each chapter to ...
2
votes
1answer
202 views
Basic login with router
It's not finished yet, but I want to know if the structure and the classes are ok and what can I change. Feel free to say anything.
To be more specific, I want to know what you think about the ...
2
votes
1answer
47 views
Nested routes and proper place for a function?
I have a Rails app and in it I have two models, widget and votes. Votes are used to keep track of the desirability of a widget.
In my models I have:
...
3
votes
1answer
2k views
PHP MVC - Custom Routing Mechanism
Note #2: This was a post from a while back. Although the top rated answer is useful (generally), I'm looking for something more specific to this issue including routing / architecture. I've even ...
2
votes
1answer
2k views
Router Class In a Lightweight MVC Boilerplate
I'm trying to come up with a simple router class. I considered using a Request class, but I think that will turn something simple into something overly complex. ...
1
vote
2answers
298 views
MVC application class
Please could you review and critic my code and logic? Is this is along the right lines of an MVC application class or not?
...
3
votes
1answer
277 views
Breakable MVC framework written in PHP
I've written a framework in MVC. I call it Midget MVC, as it's so darn small. The reason I wrote it is because I wanted a lightweight and extensible framework to use in projects. It eventually got ...
1
vote
1answer
180 views
Trying to understand appropriate routing in MVC
I am learning MVC, and trying to understand routing.
I understand that if I want to show an individual blog post for site.com/54, my route would be something like
...
2
votes
1answer
480 views
Routing, Navigation and State in MVC
I am attempting to refactor my app using the MVC paradigm.
My site displays charts. The URLs are of the form
app.com/category1/chart1
...
2
votes
1answer
1k views
Good, flexible and secure MVC router PHP
I have developed a new router after having learnt a lot from my previous attempts and I will be using this in sites I make from now on.
In a previous question, the issue of ...
2
votes
1answer
336 views
Improving my PHP autoloader
I'd like to improve my router.
This is the current code for my autoloading action within my MVC application:
...
2
votes
1answer
856 views
Small routing system
I've written a small routing system in PHP but I'm not sure if it's done the right way and what changes can they be done to the code and improvements.
...
2
votes
2answers
1k views
A PHP MVC working with Mustache (and now nested templates!)
I'd love some feedback about this code that I'm editing and shortening now.
...
5
votes
1answer
1k views
The Router - dispatch after parseURL
I'm hoping that the more experienced devs here can help me improve these methods. I'm building a basic MVC framework for myself (as a learning project,) and I'd really appreciate your insights. Things ...