Discussions

News: Simpl Web: Another d#%@ full stack Java web framework, but why?

  1. What I see in the Java world is that there are way too many (web) frameworks out there, and most of them are hardly ever used! There could be more Java web frameworks than websites built with them. So, why another web framework? Because I'm a Java developer and really enjoyed developing this web framework! It was fun! And it's not that difficult either. It was built in just a few days! In fact it's more fun to build a web framework, than building a website. But what kind of a reason is that huh? Well… I'm just being honest. But what's a website anyway? Handle some pages, handle some user input, show some stuff back to the user, handle page flow and put some security around it. Format it nicely using html and css (things that most Java programmers even don't) and do some cool effects using Javascript. In fact, you simply don't have to be an amazingly skilled Java developer to develop these kinds of things! Every basic developer can build these simple things. And even hobbyists that don't have any ICT background can hack their websites into PHP without frameworks. It's simply not rocket science! And this is what IMHO goes wrong I'm positive that there are lots of very talented Java developers and architects. Developers that like to think of complex architectures, design patterns, algorithms, and really use them into their code! And as far as what I've seen in my career, that's exactly what they're doing when building simple websites! A website suddenly becomes d#%@ utterly complex. We have to configure our guts out in loads of different types of xml's, just in case something might ever change in the future. We're trying to get multiple Java frameworks to be tied together for just basic tasks (e.g. put a record in a table). We're struggling our ways into web logic because we or some architect before us over engineered it by building architectures on top of it. We have to fix a lot of unexpected errors before we get anything to work finally. We use design patterns were we don't have to use them. We make the code more 'pretty'. Etc… And all this is usually done before we finally get to build the website logic. And then look at the other side, 'hobbyist' PHP coders using a simple LAMP (Linux, Apache, MySQL, PHP) architecture, not knowing any design patterns, not having much knowledge of software architectures, not knowing many computer algorithms, just copy and paste their ways into the internet, and only do the things they have to do to get it to work! Not making things prettier in an architecture way of looking at it, not thinking about the far future, but doing real ugly things that educated programmers were learnt not to do. And from an end web visitor's perspective, there's really no difference between them and they also don't care! So, what's my point then? Of course I am exaggerating (a bit). Not every website is the same, not all Java developers make it more complex, and not all PHP developers are bad. But I think we really have to consider something. Why do we need all these Java frameworks? It's damn hard and complex to use them all together. I don't think it's worth it in many cases. Often it can be so much simpler and easier. If you treat a simple website as if it was a complex enterprise business application, then you also get the complexity of an enterprise business application. So let's stop fooling ourselves and stop treating website development as rocket science. Start thinking about what you really need to finish the job. And before using any framework, first consider if it really gets simpler by using it. And then there's some fun… Although there are way too many web frameworks, I'm a sinner in this case also. Out of curiosity and fun I started developing my own web framework called SimplWeb. A basic web framework shouldn't be that hard to build. It's not rocket science right? And in a few days I came up with a simple, lightweight, full stack Java MVC framework which lets you built simple web sites more easily using: - clean JSP's with JSTL (no d#%@ proprietary JSP tags) for the view - error handling - REST like url's (articles/add) - Java controller classes with action methods to handle logic - database driven models by default So that's the buzz… The idea and principles behind it are similar to Ruby On Rails (convention over configuration, MVC, etc.) but with a difference: 'it's in Java,it has to stay simple, it has to stay small, it has to stay clean, and it only needs to handle web logic and nothing more!'. Nothing more!? Nothing more indeed! But what about security, authentication, ORM, transactions, AOP, monitoring, caching, all other cool stuff, etc? Simply don't need it! Because there are plenty Java frameworks and libraries that do these things! And whenever you really need them (think twice of course), they can be easily integrated so Simpl can stay simple. Why simple? "Make everything as simple as possible, but not simpler" a genius once said. His name was Albert Einstein and he's meant very much to the world. But we shouldn't forget him in this fast changing world of new technologies. His ideas are not stupid and can still be applied to whatever we do! And this is what has inspired me to come up with something really simple! To explain the whole stack and how simple it is, here's some example code. [code] /* database driven model */ CREATE TABLE `articles` ( `id` int(5) NOT NULL auto_increment, `title` text, `body` text, PRIMARY KEY (`id`) ); /* model field validation (optional), fields are read from articles table by default */ public class Article extends Model {     public Article() {         getFields().put("title", new Field(new NotEmptyValidator()));         getFields().get("title").getValidators().add(new IsUniqueValidator(this, "title"));         getFields().put("body", new Field(new NotEmptyValidator()));     } } /* controller with a method to handle '/articles/add' and saves the stuff or handles errors if errors occur */ public class ArticlesController extends Controller {     public void add() {         if (!getData().isEmpty()) {             if (getModel().save(getData())) {                 redirect("index");             } else {                 flash("Could not save the article. Please, try again.");             }         }     }     public void index() {         set("articles", getModel().query());     } ... } /* view with a form to add an article and to display the errors (if any) */ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> ${flash}              Add article         
                Title:                          ${error.title}         
            
                Body:                          ${error.body}         
                  [/code]

    Threaded Messages (20)

  2. Really.
  3. Life is not like this[ Go to top ]

    Quoting Einstein is nice, but once you leave the whiteboard and hit the real world, the Pareto Principle seems to have much wider application. Modify your example to work with multi-language and dates. Show how would your example work handle a dd/mm/yyyy date and a mm/dd/yyyy for two different users. Asking for simplicity is nice, but then again all the frameworks you are deciding _not_to use started being simple, too.
  4. Re: Life is not like this[ Go to top ]

    Quoting Einstein is nice, but once you leave the whiteboard and hit the real world, the Pareto Principle seems to have much wider application.
    I'm quoting you now :) Thanks, you're right. I believe in the Pareto Principle as well, but this is something you'll almost always have to face. There is no God framework that will handle all of your problems, not even if you use several frameworks together. And the latter is what I'm critisising. Always consider to stop adding more frameworks to your projects when in fact you're making it more complex than without it. And always stop adding another layer of abstraction when you in fact make it more complex than without it. Most (especially Java) developers tend to add all kinds of cool frameworks for every tiny task or situation that hardly ever occurs. And they end up with a hell of a complex situation. Not solving the problem, but introducing new problems.
    Asking for simplicity is nice, but then again all the frameworks you are deciding _not_to use started being simple, too.
    Exactly what I mean! Many frameworks turned out from small and simple, to end up big and complex 'we handle all of your problems' frameworks that are difficult to use. :) So let's face the Pareto Principle in the most simple way, but not simpler. Try to leave things out to solve the real problem, instead of adding stuff to make a complex, hard solution. And you probably get it by now. Simpl Web is really not the answer to all of our problems. But the vision (from Albert) behind it might save us from some problems in the future.
  5. Reformat and include links[ Go to top ]

    This article needs to be reformatted and it needs links to the web framework. Do a Google search for Simpl Web and you find a lot of other stuff.
  6. Re: Reformat and include links[ Go to top ]

    Do a Google search for Simpl Web and you find a lot of other stuff.
    That's probably not the same 'Simpl Web' :-o
  7. Re: Reformat and include links[ Go to top ]

    This article needs to be reformatted and it needs links to the web framework. Do a Google search for Simpl Web and you find a lot of other stuff.
    Hmmm.. I'm sorry for the bad formatting. It was okay when I previewed it before posting. :( I made a PDF of this article in which you can see the code also. The_Server_Side_20090413.pdf
  8. I'd rather use django
  9. I'd rather use django
    Good for you. Now please go to a python site and express your love for django there. Did you really need to make that comment here? It does not belong on a Java website and has nothing to do with Java web frameworks or his post. If you wanted to elaborate and provide constructive criticism of his framework comparing it to django, that would be welcome and beneficial. However, your single sentence is, at best, flame bait.
  10. 1) Your post is very badly formatted - ANNOYING. 2) Simpl Web turns out to be just Yet Another Web Framework. To make it worse, it's clearly a commercial framework with a dubious future. Better go for the safe options... 3) Move on.
  11. 1) Your post is very badly formatted - ANNOYING.

    2) Simpl Web turns out to be just Yet Another Web Framework. To make it worse, it's clearly a commercial framework with a dubious future. Better go for the safe options...

    3) Move on.
    1. Yes the bad formatting is really annoying. But I can't change it anymore. 2. It's not a commercial framework. I just want to show that a website is not rocket science. That it's not that difficult to make a framework. That all these frameworks out there are a little too much. And to use all these frameworks it gets more and more complex alhough in many cases it's not worth it. Just keep it simple. 3. Yes I will. :)
  12. License?[ Go to top ]

    If it's not commercial you should at least mention the OSS license you've chosen. Of course (http://code.google.com/p/internna), I can't agree with many of your reasonings but nevertheless good luck with your project and do not abandon it ever! I've found pretty more difficult to do the evangelism than the coding itself :-)
  13. Re: License?[ Go to top ]

    It is thinking outside the box. There is no license at all so feel free to use what little code there is anyway you want to! Unfortunately, there isn't much code there.
  14. Re: License?[ Go to top ]

    Unfortunately, there isn't much code there.
    There's really not much code in a simple Java web framework. And of course you may do whatever you want with it, look at the code, use it, learn from it, or print it out and puke on it.
  15. You so didn't get the point of this[ Go to top ]

    2) Simpl Web turns out to be just Yet Another Web Framework. To make it worse, it's clearly a commercial framework with a dubious future. Better go for the safe options...
    It is not commercial :) the framework is just a demonstration of how many will get fooled LOL. You have just proven that it is possible. - THX Personally I think the guy is right, most of the frameworks are cruising around this same topic, there are just two kinds: component based frameworks and request based and even than it all comes down to good-old-servlet. This article is provocative( http://en.wiktionary.org/wiki/provocative ), it aims to get you thinking outside of "the box" BTW please don't comment if you didn't read the article...
  16. 2) Simpl Web turns out to be just Yet Another Web Framework. To make it worse, it's clearly a commercial framework with a dubious future. Better go for the safe options...

    It is not commercial :) the framework is just a demonstration of how many will get fooled LOL. You have just proven that it is possible. - THX

    Personally I think the guy is right, most of the frameworks are cruising around this same topic, there are just two kinds: component based frameworks and request based and even than it all comes down to good-old-servlet.

    This article is provocative( http://en.wiktionary.org/wiki/provocative ), it aims to get you thinking outside of "the box"

    BTW please don't comment if you didn't read the article...
    But isn't 'thinking outside of "the box"' [sic] itself really inside-the-box thinking these days? Maybe we should think INSIDE the box ... or in the wrapper or something. Assuming the box comes wrapped. I think it does. Important stuff like 'the box' is always wrapped somehow so you can tell it's important. And maybe there are stamps on it from foreign countries with butterfly pictures on them. That would be neat. I like butterflies.
  17. Formatting[ Go to top ]

    Your source example is screwing up the page. You need to either remove it or make it fit inside a normal page width.
  18. Hehehehe, thanks for these comments. Funny that there are no comments on the inside of the article. I only see comments on the 'outside', the framework, the Googling for it and the formatting. :) My main goal of this article was not to push my framework, but to discuss that many things are done way too complex (in Java) and we have frameworks for each little thingy that has to be done. Most things we do are simply not rocket science. And I tried to discuss this by coming with 'yet another framework', a very simple one. Well, it looks like it's just the outside that counts in the end or my intentions were just to complex. ;)
  19. You are right, in the Java world most things are done in a very complex way when there really is no need at all for that complexity. True for lots of frame work, event true for the JDK. Your article won't get a lot of comment on the subject because of the formating issue. Not that formating is more important than the content, but that bad formating make the content impossible to reach. Fact is no one will read the full article, I know I didn't. Same problem with applications build with load of complex frameworks (the average java application), complexity make it so that the actual business of the application is almost impossible to get from the code. And that is bad.
  20. Hehehehe, thanks for these comments.

    Funny that there are no comments on the inside of the article. I only see comments on the 'outside', the framework, the Googling for it and the formatting.
    I guess there's a lesson here about marketing, eh? Also it might be a good idea to be honest about your intentions when you want to sell something. The story is a lot simpler that way.
  21. indeed, yet another one[ Go to top ]

    One more solution to the simplest problem in web app development. Am I the only one around actually developing very complex web applications? I need to tools to manage that complexity, not yet another simple tool I can write myself in a day or so.