Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Url Routing without using a framework  RSS feed

 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am seen that ASP.NET apps have a handy feature called URL Routing. How will one implement this in Java without the use of heavy frameworks like Spring MVC ? How do you even begin writing a URL Router if there isn't anything available ? Any help would be appreciated. Thanks.
 
Paul Clapham
Sheriff
Posts: 22509
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a basic feature of the servlet specification. You can use anything that implements that spec; Spring is one of those, Tomcat is another, and so on. It's going to be up to you to determine which of those is "heavy", but you do have to use something.

And isn't ASP.NET a framework?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to see an open-source implementation of such using the Front Controller pattern, check out FrontMan.
 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:If you want to see an open-source implementation of such using the Front Controller pattern, check out FrontMan.


Yes I have since this post in a previous thread. But can you explain to me what is the Front Controller pattern in plain English ?
 
Sreyan Chakravarty
Ranch Hand
Posts: 65
Firefox Browser MyEclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Spring is one of those, Tomcat is another, and so on. It's going to be up to you to determine which of those is "heavy", but you do have to use something.


For ASP.NET you don't have to learn an entire framework to implement just one feature. Learning another framework all together just for URL Routing seems a little overkill.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sreyan Chakravarty wrote:
Bear Bibeault wrote:If you want to see an open-source implementation of such using the Front Controller pattern, check out FrontMan.


Yes I have since this post in a previous thread. But can you explain to me what is the Front Controller pattern in plain English ?


See this article.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!