Skip to main content

Home/ Java World/ Group items matching "nature" in title, tags, annotations or url

Group items matching
in title, tags, annotations or url

Sort By: Relevance | Date Filter: All | Bookmarks | Topics Simple Middle
Hendy Irawan

Scala, JSF 2, and NetBeans | Java.net - 0 views

  •  
    I am working on a web site that will help students practice their Scala programming skills. As I labored along, writing my JSF app code, I thought "this is silly-why not practice Scala at the same time?" But I like JSF and wasn't ready to jump to Lift or Vaadin. With Eclipse, this isn't all that hard. Install the Java plugin. Make a dynamic web project in the usual way, using the Java EE perspective. Then, switch to the Scala perspective, right-click on the project, and, if all planets are aligned correctly, you will get a menu item "Add Scala nature". (If they are not, see here for a manual approach.) Add your managed beans as Scala classes. Finally, switch back to the Java EE perspective, select the project properties, and add the Scala library JAR as a Java EE module dependency. But I like NetBeans and wasn't ready to switch to Eclipse. (Unfortunately, JSF 2 support in Eclipse is pretty minimal, the Glassfish integration is a bit flaky, and the Scala plugin has very little usable code completion.) NetBeans doesn't let me add a "Scala nature" to a web project. If I add Scala files to the project, I can edit them with the Scala editor, but they just get copied to the WAR file, without any compilation. I had one look at the Ant scripts for a Scala and a web project and decided that I wasn't going to figure out how to merge them. This blog shows how you can use Maven to make a mixed Scala/Java project in NetBeans. So I gathered up JSF and Scala pom.xml files from here and here, cut out the considerable crud from the JSF POM file that was probably meant for supporting Tomcat, and merged the results to the best of my ability-see below. You use the usual Maven directory structure, but with a src/main/scala directory instead of src/main/java:
Hendy Irawan

Groovy vs. Scala - We Need a Closure… « GridGain = Compute + Data + Cloud - 0 views

  •  
    There was a recent outburst in blogs on the topic of Groovy and how it compares to Java. Although I respect the youthfull entusiasim of Groovy and Co. working on this little exercise I'm just perplexed by the "WHY?" in this whole discussion. Let me just say again: W H Y ?!?! 1. Practically no one cares about Groovy (let alone Groovy++ strap-on) beyond Grails community. So this language just as "widely accepted" as Ruby (at least for enterprise software development) 2. If you know Java it's equally "challenging" to pick up either Groovy or Scala. Don't let anyone insult your intelligence by claiming that Scala syntax is somehow more complex than Groovy. In both languages you will need to adapt to functional thinking - and that's where you will have to spend a couple of weekends… 3. If you know Groovy - you already know 90% of Scala (different syntax and few extra features can be picked up in the evening) 4. Scala is designed by people who have proper academic background, experience and talent in the area of language design - Groovy has never been that way (and anyone who dares to look inside of Groovy runtime or history of changes in it will attest to that). NOTE: it did come out rather strong - but that's how I feel about it and after some thinking I'll leave as is. Nothing personal to anyone reading it… 5. Scala as a post-functional language is years ahead of Groovy (static typing with best-in-business type inference, highly tuned mix of imperative and functional styles, powerful and done-right generics, etc.) 6. Groovy will ALWAYS be slower than Scala or Java (latest benchmarks put even Groovy++ about 50 times slower than Java) just by its nature unless someone changes the language and rebuilds the runtime from the ground up. 7. Once we get decent integration with Eclipse, NetBeans and IDEA for Scala, the Groovy will lose its only serious advantage
Hendy Irawan

M2Eclipse | Sonatype - 0 views

  •  
    "m2eclipse provides comprehensive Maven integration for Eclipse. You can use m2eclipse to manage both simple and multi-module Maven projects, execute Maven builds via the Eclipse interface, and interact with Maven repositories. m2eclipse makes development easier by integrating data from a project's Object Model with Eclipse IDE features. With m2eclipse, you can use Maven within Eclipse in a natural and intuitive interface. Installing m2eclipse is straightforward, simply point your Eclipse IDE installation to the Eclipse Update Sites. For instructions, prerequisites, and a demonstration video, go to Installing m2eclipse. Once you've installed m2eclipse, you can watch our m2eclipse videos to learn how to install m2eclipse and create your first Maven project with m2eclipse. For a more complete introduction to m2eclipse, Developing with Eclipse and Maven. Developing with Eclipse and Maven is a free, online book, which provides comprehensive documentation for the m2eclipse Maven integration for Eclipse."
Hendy Irawan

Project Builders and Natures - 0 views

  •  
    "The concept of automatic incremental compilation is not familiar to many developers. A very frequent question from Eclipse beginners is, "where is the compile button?" The answer is that an IDE with automatic compilation doesn't need a compile button. Every time you make a change to a file, or a group of files, the incremental builder immediately rebuilds every source file that was affected by the change. In this environment, the idea of compilation as a task the user is involved in disappears -- the world is just always in a compiled state. So what magic goes on behind the scenes to make this happen? How does the Java™ builder know which files need to be recompiled when a given source file changes? This is no easy task, but in broad brush strokes, this is what the Eclipse Java builder does: "
Hendy Irawan

Apache Aries Blueprint - dependency injection framework for OSGi, standard in OSGi Compendium R4.2 - 0 views

  •  
    "Blueprint provides a dependency injection framework for OSGi and was standardized by the OSGi Alliance in OSGi Compendium R4.2. It is designed to deal with the dynamic nature of OSGi, where services can become available and unavailable at any time. The specification is also designed to work with plain old Java objects (POJOs) enabling simple components to be written and unit tested in a JSE environment without needing to be aware of how they are assembled. The Blueprint XML files that define and describe the assembly of various components are key to the Blueprint programming model. The specification describes how the components get instantiated and wired together to form a running module. The following documentation covers the 80:20 usage of Blueprint. For further details, please refer to the OSGi Compendium R4.2 specification."
1 - 5 of 5
Showing 20 items per page