URL routing lets you configure an application to accept request URLs that do not map to physical files.
1
vote
1answer
12 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
...
4
votes
0answers
153 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), ...
1
vote
0answers
89 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
70 views
0
votes
1answer
57 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
111 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
86 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
64 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
293 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. ...
4
votes
1answer
753 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
424 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
127 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
135 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
667 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 ...
2
votes
1answer
113 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
126 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
351 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
115 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
248 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
934 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 ...
1
vote
1answer
817 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
190 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
46 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
244 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
261 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
166 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
439 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
962 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
283 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
702 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
948 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 ...
4
votes
1answer
4k views
Routing in MVC with PHP
I am in the progress of creating a MVC structured website. I've opted to make my own instead of using pre-constructed MVC systems as a way to teach myself better coding and understanding how ...
3
votes
1answer
617 views
Zend Framework getAction method
I am new to MVC and Zend, so I have little idea what I am doing at the moment, but here is my question.
The following code is my get method for an API I am attempting to build in order to learn both. ...
3
votes
4answers
383 views
Setting controller, action, and values based on the number of URL chunks
Is there any way to improve this code? It looks a bit ugly for me.
...
4
votes
2answers
2k views
Object Oriented PHP Url Router
I just finished rewriting my Router class. Any input would be much appreciated.
The class routes URLs based on a site.com/class/method/param/param/etc syntax.
One ...
4
votes
2answers
870 views
Framework to drive a small personal site
I have been writing a very slim MVC framework to drive a small personal website. It's nothing intricate, just mostly for fun and a learning experience.
Specifically, this is the initial part of the ...
2
votes
2answers
452 views
REGEXless dispatcher
I've recently helped fellow SOFer to answer his question here: Routing in my PHP MVC framework
Then I thought
Hey, why not improve this code and put in my snippets library.
This is what I came ...
10
votes
1answer
13k views
Custom route for writing friendly URLs in ASP.NET MVC 3
I'm trying to build friendly URLs like /post/1/my-first-post. I started out with building my links like this:
...
7
votes
2answers
5k views
MVC router class
Below is what I have come up with for a router/dispatcher system for my personal framework I am working on. Can you please review and tell me any improvements that could be made?
The first part is ...
2
votes
1answer
17k views
JQGrid with dynamic columns and server-side functionality
I have a requirement where I need to build a grid with dynamic columns. I am dealing with a large dataset so I would like to use server-side paging, sorting, filtering logic so that I render only a ...
12
votes
2answers
905 views
“Pluggable” routes in ASP.NET MVC
How do I handle multi-tenancy with routes in ASP.NET MVC?
The application is a multitenant ASP.NET MVC 3 application. Tenants are identified based on hostname so this does not interfere with routing.
...
2
votes
2answers
357 views
Switch statement in PHP - cleaner way to determine priority?
I have a function that takes in a controller instance, a method, and parameters (this is for a little MVC experiment I'm working on). The purpose of the function is to execute the controller method ...