I’m starting to learn Objective-C reading Apple’s documentation and it’s very interesting to see features that I love in Groovy are available to use in such old-school language (30 years old). At a first sight I thought this would be a painful language to learn without any cool feature from modern language like Ruby and Python. Also thought Apple doesn’t care about its programming language as much as the user experience, fortunately I was wrong.
Synchronizing IntelliJ IDEA dependencies with Gradle [Updated]
Based on the great post Managing IntelliJ dependencies with Gradle from Kallin Nagelberg, I’ve came to a solution about how to manage Intellij IDEA dependencies on projects that uses .idea directory as its structure.
Grails with ZK: How To Create Components in Runtime with The Builder
ZKGrails plugin has an extremely nice feature which make easier than ever to create ZK components in runtime.
Handling events on ZK macro components
One of the great features of ZK is the possibility to create a new component based only on other existing components using the declarative language ZUML - the same you’ve been using in you zul files. Those are called Macro Components. The beauty of macro components is that it’s very easy to make a new one and hence avoid code duplication on your pages.
Grails with ZK: Embedding ZUL in GSP
How about zk pages and gsp were so friends that we could use both together? Imagine the possibility to use Sitemesh to decorate your page or use UrlMapping to choose what the URL will be. Or you could move your project to ZK painlessly, you could update the pages one by one and the new code will work side by side.
ZKGrails plugin 0.7.6 has been released with this great new feature, you can use two simple tags to include any zul page in your GSP.
Grails with ZK: Where are my Controllers?
ZK’s zul pages works very differently compared to Grails’ gsp pages but they have one thing in common both have a class to control the page’s state, the behavior of each piece, the data that is showed or is being inserted by the user and this class is called Composer and Controller respectively. This is the second article about my work with ZK and Grails, read the first part before reading this one to get an overview: Grails with ZK Understanding Both Together.
Grails with ZK Understanding Both Together [updated 2x]
You may already know both technologies but I’ll briefly introduce them. Grails is the best web framework that I ever work with, it uses Groovy and convention over configuration to simplify our development efforts. To name a few this is what you’ve out-of-the-box: persistence layer to save your entities to a relational database, dependency injection, lots and lots of great plugins and GSP to build the view.
If Grails is so complete why do I need another framework and why ZK? I’m building an enterprise web app which means it will be used by users of a company to do daily tasks, I needed a more responsiveness app without refresh and without increase the effort of getting it done.
Tweak ZK to make event processing call groovy’s invokeMethod
My current project needs a very dynamic and fast pages without refreshs, or using the buzz word ajax, to accomplish this requirement I’m using ZK Direct RIA. As ZK heavily uses ajax requests with unpredictable url I need another way to protect the controller’s actions (composer’s method) instead of url. Using @Secured and groovy’s invokeMethod I was able to protect each method of any class (please read the post to get a better picture of what I’ll discuss) which works fines if the method call is from a groovy code, ZK is fully implemented in java though.
Enable @Secured annotation with Grails Spring Security plugin
How could I protect each method of my classes? Using Spring Security it should be easy, right? After a quick search I realize that the best way is to use @Secured annotation, good! Another issue fixed. But as life isn’t fun without problems to solve it didn’t work as expected.
Customizing SpringSecurity to protect each button of a page using Grails Acegi plugin
I’m very happy with grails acegi plugin, aka Spring Security Plugin, but on my newest project I needed a finner grained way to do control access than using simple urls filters and roles.
I wanted a way to control which button, link, action of the current page the user can access. If the user has only read access to a page than the page is shown but edit action isn’t, because of this requirement using only roles to grant access isn’t enough and could easily became a mess if I create one role per action. Use urls filters won’t work because most urls are generated by ZK framework and hence are non predictable.
The solution is fully based on SpringSecurity capabilities and should work on every project that uses it independent of plugins or frameworks that I use.