RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • Artigos
  • Publicações
  • Apresentações
  • Interviews
  • Livros
  • Contact
  • About
  • Abstrações transparentes e abstrações opacas

    December 4th, 2008

    No mundo de software nós freqüentemente encontramos ferramentas, frameworks e outros ítens que nos abstraem alguns conceitos, e nos dão uma maneira de trabalhar “mais alto nível”.

    Nessas situações, é comum ouvirmos que essa abstração é “transparente para o desenvolvedor”, “transparente para o usuário”, ou “transparente alguma coisa”. Essa terminologia abstrai (usar esse termo aqui foi irresistível :) ) dois tipos de abstração bem diferentes, então vou falar um pouco sobre os dois tipos de abstração encontrados em software, com algumas opiniões sobre ambos.

    O que eu chamo de Abstrações Transparentes são as que te oferecem uma forma de trabalho num nível mais alto, mas te permitem ver (é transparente afinal de contas) o que está por baixo dos panos sem tanto esforço. Um exemplo disso eu diria que é o que acontece no Struts e no Spring MVC.

    Frameworks web deste estilo tentam te dar um desenvolvimento mais produtivo, sem que você tenha que se preocupar com tudo que está envolvido no processamento de requisições e respostas HTTP. Entretanto, o fluxo de processamento da requisição e resposta é bem intuitivo do ponto de vista do que está acontecendo na interação do usuário com o servidor. E se você quiser manipular a requisição e a resposta, você conseguirá facilmente, sem “burlar” a proposta do framework.

    O que eu chamo de Abstrações Opacas são as que também te oferecem uma forma de trabalho num nível mais alto, mas te escondem bem mais o que está acontecendo por baixo dos panos. O objetivo é de fato que você não precise saber dos detalhes, e não queira se meter com eles. Um exemplo disso é o que acontece no JSF e no Wicket, e também no Aqualogic Service Bus.

    O JSF e o Wicket oferecem um paradigma de desenvolvimento web diferente do tradicional modelo “Request/Response”. Eles têm um modelo componentizado, no qual a requisição e a resposta HTTP ficam bem encapsulados, e as suas interações com o usuário devem ser totalmente focadas nos componentes. A idéia é que você realmente não veja o que está rolando por baixo dos panos, e não se envolva mesmo com os detalhes.

    Eu pensei um pouco sobre isso hoje mais cedo, mexendo com o Aqualogic Service Bus. Troquei umas idéias sobre o que ele faz quando ocorre mais de uma chamada a mais de um web service dentro da mesma transação, e na hora eu pensei: “Ainda bem que essa abstração é opaca!” :)  A ferramenta é sensacional e cuida de muitos detalhes cabeludos do trabalho com WS-* sem que você precise fazer na mão.

    Sobre os dois tipos de abstração, a decisão de qual é mais adequado varia muito com a situação e com gostos pessoais. Em relação a frameworks web, eu tenho me dado muito melhor com Abstrações Transparentes, pois eu quero ver os detalhes e quero ter controle sobre eles.

    Em situações em que não queremos controlar os detalhes do que está sendo feito, as Abstrações Opacas são muito boas, pois nos poupam esforços. É interessante saber em cada situação qual tipo de abstração você quer, porque a sua escolha de tecnologias e ferramentas será traçada com isso em mente.

    Então na próxima ver que alguém disser que alguma coisa é “transparente”, veja logo se é Transparente ou Opaca ;)


    Interview with Eelco Hillenious and Martijn Dashorst, from Apache Wicket

    July 6th, 2008

    I really enjoyed the first interview I did some time ago with Robert Elves, from Mylyn. I find very nice to gather some opinions and thoughts from relevant people in our field, and specially people involved with Open Source Software.

    This time I was lucky enough to make an interview with Eelco Hillenious and Martijn Dashorst, from Apache Wicket. I’m pretty happy with the results, and I hope you guys enjoy it too. On to the interview!

    Bruno Pereira: How did you first get involved with Wicket?

    Eelco Hillenious: At Topicus where I worked a few years ago, we had been looking for good web framework for a while to help us address the issues we had with scaling our developing effort. We were doing a couple of reasonably large projects using web MVC frameworks Struts and Maverick. The user interfaces were quite complex at times - they had things like nested tabs, wizards and paginated lists - and we had a hard time implementing them with those frameworks in a maintainable fashion. Also, we were bummed by the fact that we couldn’t reuse parts of what we did elsewhere in a project - search/ result panels for instance - and that we ended up with so much copy paste code and ad-hoc session usage. And for one of the projects, we were developing customer-specific variants. Again, we ran into the problem that it wasn’t easy to reuse elements of the user interface that we had developed elsewhere.

    Another reason we were looking for alternatives for web development with Java is that we saw that colleagues who were using ASP.NET were faster and produced better maintainable code than we were with Java. They even had more fun doing it; pretty much everyone on the Java team hated to do the web work.

    I started out evaluating JSF, which was by then nearing completion. In my experience however, one of the major problems with the way we were developing web applications was the fact that so much logic was put in templates. Not only does that make refactoring harder, it also means that you get thrown back to a procedural programming model where you can’t reap the benefits like static typing and encapsulation, etc. So I wasn’t to crazy about the role JSPs play(ed) in JSF. I did give JSF a serious look though. I read a book on it, walked through the source code and created a simple proof of concept. But the further I got with it, the more I hated it, up to the point that I simply didn’t want to put any of my spare time with it. I just didn’t like much of the architecture, and man, creating custom JSF components was even more work than creating custom JSP tags (which isn’t exactly the most elegant thing to code either).

    After that I looked at Echo. I liked Echo. I still do in fact, even though I never actually worked with it. However, I didn’t think it would be a good choice for what we were doing, because it works with layout managers. As much as I like Swing coding, I actually prefer working with HTML/ CSS to Swing’s layout managers. Furthermore, I had this hope that one day we wouldn’t be translating Photoshop designs into screens ourselves, but rather have a designer creating mockups for us that we could use with minimal adjustments.

    I also gave Tapestry (3) a serious look. I started reading Tapestry In Action, looked at the source code (which imho looked a lot better than JSF’s), and started experimenting. Halfway through the book, I had a big stack of ‘why?!’s. I could agree with the thoughts behind the concepts, but I didn’t agree with some of the solutions. Abstract classes, rewinding; it just had this stench of premature optimization to me. Still, I was ready to introduce Tapestry at Topicus, as I thought that it at least looked like an improvement for us. When I started talking to colleagues about this however, it turned out that some people had actually used it before and were quite unhappy with it. I would clearly make a couple of people unhappy by going through with it, so I didn’t.

    A couple of months later - I kind of had given up for the moment - colleague Johan stormed into the office saying he found the framework we’ve been looking for: “Wicket”. It was (and is) centered around ‘Just Java’ programming, with clean templates and reusable components. I remember we checked it out, had a simple example running in under an hour and were pretty much sold to the framework that same afternoon. Wicket was very rough, incomplete even, back then, but it had the core ideas right. It was still alpha code, but the code base looked very well engineered, and Wicket already worked well for the things we tested.

    So we started building a prototype with Wicket. We had a fun few weeks, and we already agreed that this should be the framework that would give Topicus their competitive edge in the near future. We also felt we weren’t ready to be transformed to be ASP.NET coders just yet. But then Jonathan Locke - the inventor of Wicket - sent a message to the list that he was about to shut down the project because he accepted a job at Microsoft and it would be a conflict of interest for him to keep working on Wicket. That would have such a waste to let that happen! So I got Johan and Martijn in a room, and asked them if they wanted to help out and take Wicket over. We agreed to commit to at least a year of whatever it would take of our spare time to turn
    Wicket into a mature project suitable for Topicus, and hopefully with a viable community around it as well. We also invited Juergen and Chris to join us. They were already active on the list and had sent in a few good patches. The cooperation turned out great, and when Jonathan left Microsoft again a few months later (for unrelated reasons), we welcomed him back into a Wicket that was quickly approaching a 1.0 release and had a good core of early adopters.

    Martijn Dashorst: Mostly like Eelco’s answer, but from a different perspective: I was a Windows client developer used to build GUI’s with Borland’s VCL. Then I had to build web apps using Maverick and Velocity. I hated that experience and constantly asked myself: WHY is this so hard and so much work. Wicket salvaged me from this negative experience: it felt like returning to VCL programming and for the first time I enjoyed
    building web apps.

    BP: We have perhaps a hundred Java web frameworks, and Wicket was not among the first of them. However, I like to put Wicket in a separate class from the others, as it offers a new paradigm of web application development. How would you say Wicket fits in this field and what does it bring to Java web developers?

    EH: Many of these alternatives are really flavors of the same model 2 ideas. In my opinion, there are basically these frameworks - Struts, WebWork, SpringMVC, whatever-the-flavor-of-the-day - and frameworks like Wicket but also GWT, Echo and Tapestry that really provide a different alternative.

    Most web frameworks go through great lengths trying keep their users far away from regular Java programming. Wicket provides a programming model that stays as close to Java as it can, with all the advantages of static typing, encapsulation, etc.

    BP: JSF is perhaps Wicket’s strongest competitor (if there is such a thing), and it benefits from Sun’s support, good development tools and a huge set of avaiable components. How is Wicket evolving in terms of tooling support and avaiable components?

    EH: Frankly, I think JSF isn’t doing so great when it comes to the availability of components. Much like the component market for ASP.NET, there is a lot of promise but not much delivery if you ask me. Yes, there are a bunch of component libraries out there, but they are often incompatible and are often quite monolithic. The latter is JSF’s fault really.

    The fact that Wicket tries to make creating custom components as easy as possible (ideally, as easy as extending a class and maybe providing some markup that goes with it), makes that it is less relevant what
    components are out there. You want to have a good base set of components that are easy to extend and/ or customize, and hopefully people will create their own library of components that suit their particular needs.

    That said, Wicket actually has an impressive range of custom components. Besides the decent number of components that are available as part of the core Wicket projects, there are a ton of projects in wicket-stuff (of varying quality, but there are a few real gems in there), and there are initiatives like DataBinder and InMethod that provide custom components.

    But really the best way to go with Wicket in my opinion is to create a layer of base components for your project that look and behave exactly what you need. A little bit of work upfront, but it can save you a lot of work and maybe even code duplication later on.

    FWIW, I don’t view JSF as our largest competitor in Java land; I would think that is GWT. There’s pros and cons to both GWT and Wicket, and I certainly think Wicket has an edge in some areas, but GWT is very cool conceptually, and from what I’ve seen it is very nicely done and even has tooling support that actually works.

    BP: We have seen many Ruby on Rails zealots claiming Java’s dead and that RoR is the next big thing. I’d like to know your thoughts on that. Can we consider ourselves Java’s orphans? :)

    EH: Nah. The hype is already sinking in, and you read more about infighting dramas than success stories nowadays. I’ve also heard several stories from developers who actually did do one or two serious RoR projects, and as much as they liked having quick results the first few weeks, they got into a mess later on. Basically, their code base grew, they got more people on the project, all with their own ideas of neat DSL-like constructs and gung-ho LOC saving tricks, and pretty soon no-one understood much of what was going in that code on any more. And some of those people actually did have real scaling problems.

    Much of the critique on Java from the RoR camp (and others) was quite justified however, and I think J(2)EE can take much of the blame for that. You can develop quite ‘light’ and practical with Java if you just ignore most of the heavy sounding advice you see on ‘enterprise development’ and use your own brain instead. Unfortunately, the idea that the next step in productivity is dumbing down development by providing more wizards, drag and drop tools and servers that clean your house and do your shopping on the side is wide spread. To me, the most exiting thing about the whole RoR uproar was that it brought back the spot light on coding instead of big fancy tooling and servers.

    BP: I know several Wicket developers like Scala, which seems to be a very promising new language. Do you think it will become mainstream in a near future?  Will Wicket have something done in Scala?

    EH: That’s hard to say. I like some of the ideas of Scala. It really looks like an incredible piece of work, and there are plenty of things in Scala that I’d love to work with today. It would make working with Wicket a lot more elegant, and it definitively would make my own code a lot nicer.

    However. What almost everybody I spoken to about Scala says, is that Scala provides too much freedom, too many ways to achieve the same thing. They may be right. Part of me says, well, it would be great to have a language just for the experienced people who hopefully know how to use constructs with taste. But then again, I haven’t seen much actual Scala code or discussions on the Scala list that give me that warm fuzzy feeling. In fact, when I lurked on their list a while back, quite a number of the discussion were about how to make notations even shorter (and consequently less readable). Research says that the bulk of the cost of producing software comes ‘after version 1.0′, and that’s my own experience as well. Maintainable, understandable and predictable software is what we need, even if it means that you need to write out a few more lines. Less code is great for maintainability, but it needs to be readable at the very least.

    Also, I firmly believe Scala needs a *very* good IDE to succeed. I’m a fan of good IDEs. I like the time they save me when looking at new code (code navigation, javadoc hoovers, code generation and completion). Without good IDE support for Scala, I’m simply more productive with Java, even though it means that I have to implement ugly workarounds for things that would have been easy and elegant with Scala. There are some initiatives for IDE support but I think that to get something really good, there has to be industry support. Maybe one of these days a vendor realizes how much of their effort they are wasting on JSF and see the potential in Scala.

    Another thing Scala badly needs is a bunch of people who can sell it. The fact that RoR looked sexy from the start might have been quite an important factor in their success, and Scala currently is probably the un-sexiest looking framework on the planet. And that’s ‘just’ a matter of community building really. I’m sure if people are interested in making Scala a success, they can find people to work on their image and get the name out there.

    Anyway, we’ll see. I hope Scala can be a good counter to .NET on the long term; it could be the Java variant of F#, and maybe we’ll get our own taste of LINQ with it.

    BP: Wicket started as a project on Sourceforge, then it was incubated in Apache Software Foundation, and finally became an Apache top level project. I’d like you to comment on this process of joining the most respected open source foundation. How was this experience?

    EH: It actually started as a project on codehaus. Unfortunately, we had problems getting commit rights after we wanted to take over from Jonathan, and after waiting for a few weeks, we decided to move the project to Sourceforge.

    The experience was good. We had a couple of mentors who were great in guiding us through and backing us up with discussions.

    What we got from moving to Apache is - amongst other things like image and stuff - that we are even more conscious about our community. I think we always had the proper open source attitude, which means so
    much that you try to get people to participate, take them seriously in discussions, and understand that it comes with a responsibility, but now we don’t have just our name to keep high, but also Apache’s name.
    Oh, and it was very nice to attend conferences and put some faces on the names of the people who have been slaving on their own cool projects.

    MD: Joining took longer than we expected, but Apache folks constantly remind me that Wicket was actually one of the fastest projects to go through the incubator. The slowness was really our own fault: we didn’t concentrate on getting out but were too caught up in maintaining three branches. When we axed one main development branch we were able to get out of the incubator in a couple of weeks.

    Apache brings us a solid legal foundation to our code. Although this adds more ceremony to releasing and accepting new code made by third parties. I think it is worth the extra effort to have a solid legal foundation at the base of our code.

    Another thing that Apache brings and one probably can only understand by experiencing it first hand is that Apache is a Community of projects - not a couple of projects sharing a server. There is a large difference between Apache and sourceforge, googlecode, java.net. The latter three are just servers with a lot of projects on them.

    BP: Wicket has a distributed development team, much like most open source projects. I’d like you to describe your development process, and how do you manage the community contributions.

    EH: You can find all that on the Apache site! :-) I would say every thing goes very bottom up. Everyone feels responsible to take up things, and activity of most people fluctuates. We have a large, very active community and there is lots of discussion, bug reports and patch submissions (though we can never have enough of those!) happening. We all have our own areas of the code base we like to work on, but in principal, anyone can work on anything. We don’t always do a lot of upfront discussing regarding fixes etc (unless of course, something isn’t clear to start with), but we all keep an eye on the commit logs, and you can regularly see a discussion start about a commit, sometimes resulting in rolling back or further tweaking the code. We’ve worked like that from the start, and I still think it works great.

    BP: You guys are finishing the writing of Wicket in Action, the second book on Wicket. I read the first seven chapters, and the book helped me a lot understanding some aspects of the framework. I’d like you to talk about the book experience, and how do you expect it to help Wicket’s adoption.

    EH: The third book by now even! Kent Tong also wrote a book on Wicket.

    I hope the publisher isn’t reading this, but I hate(d) writing the book. Martijn and I did it primarily for Wicket and it’s community, so that people would have some more ammo convincing their managers to adopt Wicket, and to give Wicket’s users a better understanding of how Wicket can be used successfully. Neither of us wrote a book before, and we figured, oh what the heck, it’s something to brag about in front of the grand kids when we’re 70. Well, we certainly hope the bragging will be good, and many people will benefit from reading it, because it was a lousy experience for us. It brought me back to high school, when I pretty much never did any of my home work (in fact, I would often skip school to work on my C64 programs), but still had enough of a conscience to feel guilty about it. Writing Wicket In Action was like that. I would put things off - hiking, making music, checking out bands - because I felt I had to reserve my evenings and weekends for writing. And often, in the end, I didn’t even get to do much because I was uninspired, or a friend showed up, or we had to do shopping or cleaning the house. And then I’d feel guilty again!

    I would sum it up by saying that for me it felt like work, whereas coding on Wicket in my spare time felt like a hobby. If I would do it all over again, I would take a few months off and write during the days. That would probably make the whole thing acceptable (though coding is still much more fun).

    MD: One remark: don’t write a book in your spare time. Eelco and I have been writing this book for over 2 years now. This means: no hobbies for 2 years. Bringing laptops with you on vacations to write. Staying
    up until 2am writing and getting up at 7am because the day job also needs your attention. And all this for more than 2 years.

    If I would have to do it again (which I doubt, my wife would kill me), I would do it full time instead of in the little hours after work.

    The book itself is coming together quite nice. We have quite a lot of folks that help us with the book: our early access readers (THANK YOU!) and we have an excellent editorial team. Since Wicket has such a large surface area, I even use the book to learn more or look up things. So you can say it caters to both beginners and more experienced Wicket users.

    BP: Wicket recently released the 1.3 version, the first after becoming an Apache project. Could you provide us a vision of the current state and the future of the project?

    EH: We are regularly discussing this on the list, and we’re currently working on Wicket 1.4.

    1.3 is a solid release. 1.2 can be used in production environments just fine, but 1.3 is optimized in many ways, and we got most of our API streamlined in a fashion that should last for a few years now.

    1.4 has a limited scope in that it only introduces generics and Wicket with a couple of other Java 5 features people have been wanting for a long time. 1.4 should be backwards compatible. You’ll just see plenty of warnings when you don’t use generics. So Wicket In Action should be good for 1.4 without adoption.

    What we’ll do after that is open to debate. We definitively got the message from all the ex-Tapestry users that we should not go overboard with API changes between releases, so we’ll do our best to keep providing smooth upgrade paths between releases.

    One thing we’ll probably look at is how to make controlling what URLs are generated even better. This is very flexible already, but a bit clunky at times.

    Closures could make Wicket a lot nicer to work with as well. Though, considering that we just now switched to Java 5, that might take a while to get into the framework.

    And who knows… if Scala gets good IDE support and a good sized following, I think it would be exiting to see what we could do with it in for Wicket. I think we could build on top of the Java version, and provide a thin framework that makes working with Wicket in Scala smooth.

    MD: The future will bring beautiful things. I expect us to work on better integration with JavaScript libraries and trying to implement the Yahoo rules for performance (merging javascript files into one to limit the number of http requests, etc). Versioning of JavaScript libraries is also something I like to see solved in the future. We are also going to take a good look at our unit testing framework: it is pretty solid but the API doesn’t feel Wicket like. I’d also like to integrate an animation framework into our Ajax implementation to
    enable effects when updating pages. I think that it currently is harder to do than strictly necessary.

    BP: Closing thoughts…

    EH: Thanks for the interview! And download the first chapter of Wicket In Action for free at: http://www.manning.com/dashorst/; even if Wicket isn’t your thing, I hope it gives readers some background in the problems it tries to solve.

    MD: I know that a couple of Brazilian companies have adopted Wicket for their main development. I’d like to see a Brazilian community evolve and generate such events as we have in Europe (Amsterdam, London, Copenhagen) because I’d love to visit your country again :-). If you are not a Wicket user, then check out our examples: http://wicketstuff.org/wicket13 or http://wicketstuff.org/wicket14 (may not be available now, but will in the future). Our community is very welcoming and active: join our user list to ask questions and
    help out. Join the dev list to help us make a framework you want to use. And if you don’t fancy email, you can join our irc channel that is always available: ##wicket at irc.freenode.net. Obrigado!

    Well, if you read til this point, I hope you’ve enjoyed! Please leave your comments if you wish.


    Grails - ótima ferramenta para alguns projetos

    April 19th, 2008

    Toda semana eu e o Silvano discutimos vários aspectos das nossas aplicações. Como melhorar algumas delas, novos componentes que podem trazer ganhos interessantes, mudanças de arquitetura, etc. Os principais objetivos são: trazer mais qualidade para os projetos e produtividade para a equipe.

    Alguns meses atrás estávamos falando com freqüência sobre frameworks web. A maioria das aplicações na Globo ainda usa Struts 1.x. O Struts 1 foi por muitos anos o framework web padrão Java. Ele trouxe muitos ganhos interessantes, comparando com o desenvolvimento usando apenas Servlets + JSP.

    Um ponto “fraco” do Struts 1 é que ele não tem nenhum suporte a componentes visuais. Toda a parte visual das aplicações fica por conta dos desenvolvedores, assim como os recursos “Web 2.0″. O problema é que desenvolver esta parte visual de forma customizada em todos os projetos é muito trabalhosa, não é produtiva. Com isso surgiram inúmeros frameworks mais modernos, com suporte visual muito mais rico, trazendo boa produtividade neste aspecto.

    O fato é que com esta enorme gama de opções, não temos mais um framework que se destaque de forma absoluta sobre os outros. Temos várias opções para cada projeto. Entretanto, não dá para querer abraçar o mundo, então é comum que busquemos 1 ou 2 opções que nos atendam em quase todos os casos.

    Na nossa equipe nós já temos uma aplicação com JSF, que na verdade foi concebida ano passado, antes da minha mudança de equipe. Eu estou usando o Wicket em um projeto pessoal e ainda estou aprendendo o framework, ainda não o domino a ponto de usá-lo de forma produtiva. Com alguma freqüência nós discutimos sobre estes 2 frameworks, e eu ainda tenho a opinião que descrevi anteriormente.

    Neste escopo das discussões sobre JSF vs Wicket, também falamos algumas vezes sobre Rails e Grails. Algumas semanas atrás eu e o Silvano começamos a estudar Grails, e fizemos pequenas aplicações de exemplo. Eu já li inteiro este livro de Grails disponível no InfoQ. Ele estava aqui na minha lista de “Livros que quero ler quando tiver tempo”, mas já o movi para a lista de livros que li :)

    Eu estou gostando bastante do Grails, pois ele é extremamente produtivo para aplicações nas quais eu acho que ele faz sentido. Você consegue em 2 dias desenvolver aplicações que provavelmente você demoraria 1 semana ou mais com frameworks Java tradicionais. Eu ainda não o utilizei o suficiente para saber os limites de uso do mesmo. Provavelmente para projetos com requisitos mais críticos de carga e customização das interfaces, ele já não será uma opção tão boa assim. Entretanto, em aplicações internas, com carga limitada e sem grandes necessidades de customização visual, ele é perfeito.

    O próximo passo para mim é tentar utilizá-lo em casos mais complexos. Estou pensando seriamente em utilizá-lo no @dvogado.com, um software para advogados que eu desenvolvo no meu tempo vago, mas que está congelado há alguns meses por falta de tempo. Quando eu conseguir um pouco mais de tempo vou tentar implementá-lo com o Grails, e acho que consigo fazer isso bem rapidamente. O Grails atenderia bem à minha proposta de distribuir um pacote completo com tudo que o usuário precisa, tornando o deployment o mais simples possível. Com o Grails eu utilizaria o Jetty + HSQL que ele traz por padrão, e precisaria adicionar apenas o JDK no pacote.

    Uma discussão muito interessante também é a de Grails vs Ruby on Rails, mas isso fica para um outro post em breve :)


    Java Server Faces x Wicket: great framework of old paradigm vs new paradigm

    January 16th, 2008

    Just beginning 2008, I went to a new area, new team at Globo.com. There are several promising projects for this year, and this team switch will make it easier for me to properly evaluate and judge what I consider the 2 leading Java web frameworks nowadays.Like I said here, on my spare time I (try to) develop a lawyer application which uses Apache Wicket as its web framework. One of the projects I’m now working at Globo.com uses Java Server Faces. This should be a great opportunity to finally go deeply on both frameworks and see in which cases each one is better than the other. Based on what i have already studied and used of both, i do have some opinions that may or may not change several months from now.

    First, a little background. When i was studying to pass the SCWCD exam, I saw enough of tag libraries to get really sick of them :) JSTL, Struts 1.x Taglib, Expression Language, etc etc etc. Every new taglib was a new syntax to learn, and the result of using taglibs to implement complex web pages is the famous tag soup. Not being a purist, although I don’t like scriptlets in general, I do think that in some cases they produce much cleaner code than the heavy use of taglibs.

    Having said that, let’s start talking about JSF. Being a standard technology backed by Sun, and present on Java EE 5 specifications, you know that you’re gonna find plenty of support by development tools, many examples on the web and an already mature community of users to help you. JSF offers a huge set of components ready to use, and many of them are very pretty and easy to use. In my case, we’re using JBoss Tools + Rich Faces, and the Eclipse plugins avaiable here are just awesome.

    Most of the web applications I have worked until now used Struts 1.x, and although Struts is by far the most successful Java web framework til now, developing with JSF is reasonably easier and more pleasant. However, even considering the clear evolution of JSF over Struts 1.x, I still qualify both within the same paradigm. That is, both have a massive dose of non-markup code in their views, and if you’re gonna work with them, you better have your spoon ready to dig into the tag soup :) Ok, ok, JSF offers very nice components and manages a lot of the work that was left to the developer in the old times, such as managing the application state and offering a beautiful presentation layer without requiring the direct manipulation of javascript. But you’re still going to have your view layer full of taglibs, coding in a special syntax (the custom tags syntax) that will make it tough to track for problems when they happen within the tag soup. You better have a magical spoon to manipulate it ;)

    Rather new in the Java web frameworks field is the very innovative Apache Wicket project. Wicket allows Java programmers to focus on what they do best: write Java code. No taglibs, how refreshing! :) Wicket also uses componentized development, and it isolates the view from your model in the best manner I have seen til now in Java frameworks. It does not seem so intuitive in the beginning, because you code for a web application in a similar way as you would code a Swing application. Specifically the component’s event handling code in Wicket reminds me a lot of the approach used in Swing applications.

    Being a new framework that went out of the Apache incubation just several months ago, you can’t expect great tooling support at this point. Drag and drop tools to design screens? Forget about it! Component options similar to JSF ones? You’re not gonna find it either. However, Wicket has a very active community and it’s evolving fast. The second book on Wicket will be avaiable in a few months and the number of users and successful implementations is growing steadily. The set of avaiable components is growing and it’s becoming much easier to find support in their forums.

    As I said, I’m far from an expert in both frameworks, and I hope this year I’ll have a long enough exposure to them and probably in a few months I’ll have more valuable opinions. Something I think about is that perhaps knowing Wicket and JSF well can be really useful, because it doesn’t seem like we have a “one size fits all” choice here. Wicket seems great for a company to base its developments and have good and maintainable code that will be easy to build over for several years. JSF certainly can offer that too, but i find it tough to consider taglib code as easy to maintain. However, JSF offers such great components that even a Java developer like me with no talent to create good looking pages is able to generate a very decent user interface.

    I’ll confess I have a natural preference for Wicket since the beginning, but I promise I’ll try to evaluate these 2 options without any passion during this year and later this year I’ll post again telling my conclusions (if any) ;)


    @dvogado.com aprovado no java.net!

    November 28th, 2007

    Caros amigos, já comentei aqui anteriormente que no meu tempo vago desenvolvo um software para advogados. Este projeto é open source e está em desenvolvimento, ainda não tendo nenhuma release.Algumas semanas atrás eu cadastrei o projeto no java.net, e hoje recebi o e-mail me informando que ele foi aprovado lá! O projeto está oficialmente incubado no java.net. A home do projeto lá é https://advogadocom.dev.java.net/

    Os detalhes do projeto podem ser vistos na página do java.net, mas a arquiteturá básica terá Apache Tomcat 6.0.x + Apache Derby 10.x + Java RE 6 + Apache Wicket como framework web.

    Quando tiver mais novidades do projeto, voltarei a postar aqui! :)


    Make deployments as simple as possible

    November 21st, 2007

    O título deste post é uma das preciosas dicas presentes no Effective Enterprise Java. Esta dica faz bastante sentido em ambientes corporativos, onde em boa parte dos casos não são os desenvolvedores que farão o deployment da aplicação, e sim uma equipe de operações. Quanto mais fácil for o processo de deployment da sua aplicação, mais chances de que a equipe de operações faça o deployment corretamente, e menos chances de eles terem problemas que você precise ajudar.Bom, quanto à validade desta dica em ambientes corporativos eu já estava ciente faz tempo, e sempre me guio por ela quando preciso montar a forma de distribuição de uma aplicação. Entretanto, há alguns meses eu fui vivenciar a validade desta dica também em ambientes não corporativos, com uma pessoa leiga tentando usar um software distribuído individualmente.

    Eu estou desenvolvendo no meu tempo vago um software para advogados. O principal intuito deste software é permitir a gerência de processos, clientes, audiências, reuniões, etc. A idéia é que o software possa ser utilizado individualmente por um advogado ou de forma compartilhada em um escritório por exemplo. A aplicação é Java e possui interface web. Qualquer pessoa com acesso à máquina onde a aplicação estiver rodando pode utilizar a mesma.

    A idéia de instalar um servidor de aplicações e um servidor de banco de dados em um escritório não é tão amedrontadora, embora de certa forma dificulte a distribuição em massa da aplicação. Porém, imaginem que para utilizar a aplicação individualmente em uma máquina em casa um advogado precise instalar o Java e um servidor de aplicações, instalar um servidor de banco de dados, copiar a aplicação para o servidor de aplicações e então usar o software. That’s not gonna happen, forget it!!

    Qual seria uma solução mais fácil? Criar um instalador que faça estas instalações todas, crie atalhos, etc? Acho que isso resolveria sim. Mas eu não tenho muita experiência em criar instaladores, e eu também quero permitir que a aplicação seja utilizada no Linux e no Mac OS além do Windows. Prefiro uma solução ainda mais fácil que a de um instalador.

    Todo mundo hoje em dia possui algum software de compactação (zip, rar, etc) em casa, e acredito que qualquer pessoa que se proponha a utilizar um software para advogados saiba descompactar arquivos. E se fosse possível fornecer um único arquivo zipado para o usuário e este precisasse apenas descompactar o arquivo para qualquer diretório de sua preferência e clicar em um atalho para utilizar o software? Isto é ainda mais fácil que um instalador, não é?

    O Jira Standalone é distribuído como um zip que você precisa apenas descompactar e usar, contanto que a sua máquina possua Java instalado (e que o Jira encontre seu Java). Eu gostei bastante desta forma de distribuição, ela é muuuuito mais prática do que a instalação do Trac ou do Bugzilla por exemplo.

    Entretanto, eu não quero exigir que um advogado tenha instalado previamente o Java e muito menos que ele configure qualquer variável de ambiente para utilizar meu software. Então resolvi facilitar a vida deles. A minha aplicação web utilizará o Tomcat, Wicket e o Derby como banco de dados, e eu vou distribuir tudo isso empacotado junto com JRE em um único zip para que o usuário descompacte e use.

    Fazendo isto eu consigo garantir que todos os requisitos da aplicação estarão presentes e bem configurados, e de lambuja saberei sempre que as versões de todos os componentes são compatíveis, porque eu distribuirei versões previamente validadas de todos eles. Quando eu quiser atualizar a versão de tudo, sem problemas também.

    A propósito, já li as licenças de cada um dos componentes e eu posso livremente distribuí-los ao usuário final sem custos, contanto que eu distribua o JRE da forma que obtive da Sun.

    Open source is powerful and beautiful, isn’t it? E aí, o que acham desta forma de distribuição? Críticas são bem-vindas!


  • rheumatoid arthritis medications
  • medicine for pets
  • natural treatments for insomnia
  • sleep disorder treatment
  • anti vomiting
  • blood sugars
  • generic reglan
  • pharmacy no prescription
  • drugs for sale
  • muscles human body
  • anabolic creatine
  • online diet meds
  • acne cure pills
  • cialis benefits
  • metronidazole dose
  • women body building
  • otc claritin
  • cetirizine drug
  • cialis 5mg
  • baby acne
  • lipitor use
  • throat gonorrhea
  • cheap phentermine without a prescription
  • how does viagra work?
  • valium high
  • chest pain symptoms
  • prescription drug store online
  • cheap pain meds
  • acne face medication
  • pet health websites
  • anxiety order
  • what is premature ejaculation
  • dog skin
  • hair loss drug
  • online paxil
  • coupon zantac
  • effects of folic acid
  • buy canada drugs
  • curing premature ejaculation
  • carisoprodol cheapest
  • side effects of cancer treatments
  • women heart attack
  • lowest price generic viagra
  • pet supplies plus
  • vitamin supplement ratings
  • diabetes treatment
  • zoloft discount
  • coupon claritin
  • women insomnia
  • buy aciphex
  • cialis on line
  • treatment for hepatitis b
  • order metformin online
  • cialis cheap cialis online
  • claritin allergies
  • mexico pharmacies
  • how to lower blood pressure
  • diclofenac tablet
  • ordering medications online
  • cancer drugs
  • diflucan purchase
  • how to get birth control
  • dog skin infection
  • lowering blood pressure naturally
  • clonazepam pharma
  • health products women
  • buy cialis
  • soma or valium
  • pre diabetes
  • side effects blood pressure tablets
  • discount pain relief
  • dog med
  • osteoporosis calcium drug
  • tramadol without a prescription
  • zoloft drug
  • treatment high blood pressure
  • sildenafil 100mg
  • discount herbals and vitamins
  • aricept generic
  • asthma information
  • bupropion anxiety
  • free acai
  • top hair loss
  • yeast diflucan
  • health care for dogs
  • green tea products
  • cheapest place to buy phentermine
  • canada pharmacy drug perscription
  • high cholesterol treatment
  • viagra free trial
  • cancer cure
  • treatment to stop smoking
  • arthritis pain medicine
  • buy vardenafil online
  • generic viagra generic
  • vitamin list
  • discount soma online
  • facial skin care products
  • buy vitamin supplement
  • cialis alternative
  • viagra for cheap
  • sildenafil
  • online diet drugs
  • online drug
  • benicar tablets
  • purchase medicine on line
  • what is ambien
  • online prescription drug
  • hair loss disease
  • medicine that prevents blood clots
  • antifungal drug
  • medicine for vomiting
  • how to take a beta-blocker
  • san diego soma
  • vascular edema
  • acne skin care treatment products
  • how does viagra work?
  • reduce blood pressure
  • phentermine with no prescription
  • chlamydia treatment online
  • buy levitra on-line
  • beta blocker uses
  • viagra fedex
  • giving cats pills
  • menopause natural treatment
  • oral fluconazole
  • stop smoking today
  • prescription pain medicines
  • menopause natural treatment
  • fda avandia
  • actonel dosage
  • haldol medication
  • how to burn fat
  • all natural antibiotics
  • healthy dog food recipe
  • reduce swelling methods
  • prescription drugs on line
  • drugs use in arthritis
  • weight loss meds on line
  • cheap weight loss
  • pain in chest
  • chlamydia treatment
  • acai cleanse
  • online pharmacies with no prescription needed
  • cancer medications
  • clomid dosage
  • generic pravachol
  • what pills look like phentermine
  • dosage of viagra
  • how to prevent pregnancy
  • treatment for cancer
  • buy generic cialis
  • when is viagra needed
  • no hangover
  • water pills
  • what is generic viagra
  • antianxiety
  • buy asthma meds
  • acyclovir information
  • bronchitis pregnancy
  • treatment for alzheimer's disease
  • medicine chlamydia
  • mail order medicine
  • new treatments for lung diseases
  • cheap pain pills
  • constipation large stool
  • hand pain
  • stopping hair loss
  • antibiotics diarrhea
  • medication without prescription
  • help for infertility
  • weight loss diet
  • body building diets
  • atenolol interaction
  • medical heart failure
  • small dog products
  • stress pills
  • singulair generic
  • what is heart failure
  • new diet pills
  • discount viagra generic
  • order alli
  • treatment for infant diarrhea
  • buy prescription medication online
  • insomnia disorders
  • medical treatments for acne
  • skin disorders in cats
  • zantac medication
  • antibiotics bactrim
  • high blood calcium levels
  • vitamin supplement store
  • jelly kamagra
  • stress drug
  • health products for men
  • health supplement woman
  • us online pharmacy
  • energy saving products
  • about zocor
  • high amount of acid in blood
  • malaria medicines
  • Bruno Pereira is Digg proof thanks to caching by WP Super Cache!