Weld archetype vs Seam Forge - seam

I'm building a new project using Seam 3. I don't understand what the difference is between Weld archetype and Seam Forge. Both of them help us to build a simple project template to start with.

Seam Forge is a tool similar to seam-gen from Seam 2.
Seam Forge is a console where you can setup and generate your project, you can choose a version of libraries, JPA implementation etc
you can create classes, add fields to them, create CRUD and many more
weld archetype is a 'simple application' (configuration) with pom, configuration files and example classes ready to develop your application
I think Seam Forge is stronger tool and have many features helping rapidly develop your application.

In the long run, Forge will be useful for incremental enhancement of your project using extra plugins, like so: https://docs.jboss.org/author/display/FORGE/Installing+new+Plugins
This basically lets you extend your project with anything that can be imagined!

Related

Spring + Microservice + JBoss

We are planning to build an application which has multiple modules
(say [Common which contains Admin, Registration], License Module,
Stock Module ). We have planned to use Maven as our build tool
Each module acts like a separate folder(war) where in it has MVC layers in it. Main POM should encapsulate all the modules and form a war file.
If a customer doesn't need License Module, i can just unplug the settings and recreate a war file without much effort.
Now i am struggling to find proper example to build a hierarchy(project structure like above)
Could you please guide me on this ?
You can create a parent project then add the child projects as modules. You can easily comment or delete these modules before building the project.
Here is a basic example.
http://www.concretepage.com/build-tools/maven/parent-pom-child-pom-example
You can get a good idea about parent child maven projects from the following thread as well.
Maven: adding a reference to a parent pom project

What is symfony in the vendor folder?

When I create an app using composer, or install another app created using composer, there is a vendor/symfony folder included.
For example, I installed Laravel using composer. The folder vendor/symfony is present. I am not specifically referencing this in my Laravel app at all.
What is this folder, and it needed? Does the app use it, or composer use it? So if I am using an app created using Composer and dont use composer myself, can it safely be deleted and the app still run? Or could the app be using it?
Thanks
Answer is quite simple: Laravel uses Symfony components.
Check this article: http://www.sitepoint.com/build-php-framework-symfony-components/
Improved Routing Engine
Laravel 4.1 features a totally re-written routing layer. The API is
the same; however, registering routes is a full 100% faster compared
to 4.0. The entire engine has been greatly simplified, and the
dependency on Symfony Routing has been minimized to the compiling of
route expressions.
http://laravel.com/docs/master/releases
The "vendor" folder is a standard in every application / framework that uses composer to manage dependencies. In the "vendor" folder you will find all dependencies (read: libraries) that your applicatication requires.
But you will also find all libraries that your libraries require. In order to minimize code duplication, and thanks to the composer system, most open source projects now reuse parts from other open source projects.
BTW, this is great.
Symfony components are excellent and well documented, so they are currently used by many other frameworks and applications.
Inside the "vendor" you may find other libraries that you did not specifically require yourself, but as long as your correctly use composer, that's not something you should worry about.

De facto structure or template for spring mvc

I have started learning spring framework and I could get my way around it by referencing several example and templates.
But still I'm clueless how to start a spring mvc project from scratch. How would be the structure like ? If I were to choose XML based configuration or Annotation based configuration.
Any reference or suggestion would be helpful.
EDIT:
I'm using maven and trying to deploy with jetty. It would have been nice if archetype generate had a template for spring mvc.
There are some spring plugins available to generate project but still its a bit confusing because it varies between IDE.
NOTE:
spring-boot sort of frameworks are simpler. But I'm interested just plain old spring.
Download and run this example showcase of mvc features.
Run this in command line
$ cd spring-mvc-showcase
$ mvn tomcat7:run
Refer to this Spring`s Getting Started guide

Alfresco Development . Working with All in one Archetype

I have created a multi module project in Alfresco using All-in-one Archetype of the Maven Alfresco SDK. I have selected 1.1.1 archetype version. The project directory was build successfully. But in that directory I couldnt find the wcmqs(Alfresco Web Quick Start) directory which is used to build websites. Can anyone help me hw to get this wcmqs, as I need to work with wcmqs for creating new pages and templetes in wcmqs?
The wcmqs module did used to be in the Maven Alfresco SDK but it never worked very well and caused other problems. It is however unnecessary to use the Maven Alfresco SDK if you wish to get started.
To get started with Alfresco Web Quick Start you just need to download and install the files. You can get the files from Sourceforge: http://sourceforge.net/projects/alfresco/files/Alfresco%204.2.f%20Community/
Installation should be straightforward. You need to install the AMPs on your Alfresco instance and deploy the WARs to a servlet container (like your Tomcat).
If you want to customise Web Quick Start, such as changing the model, that is a different matter. There is a short example here that you can go through to give you an idea of what you need to do:
http://ecmarchitect.com/archives/2011/01/06/1254

Develop a common jar library for different liferay portlets

I need some utility classes that will be common for three different Liferay portlets so I will develop them in one project that should be shared for my portlets.
I am using Eclipse with Liferay IDE plugin and my question is what kind of project is that one that I need?
I mean is it a simple Java project or any kind of Liferay project?
There are ways you can do this:
Create a simple Java project. Package it as a JAR file. Put the JAR file in global class-path In case of tomcat the global class-path would be ../tomcat-7.0.27/lib/ext/.
Create a simple Java project. Package it as a JAR file. Put the JAR file in the classpath of each and every portlet.
Create a Liferay plugin-portlet using service-builder, put the utility classes in the service package so that the utility classes go in the [name-of-your-project]-service.jar. And then in the portletswhich would need these classes specify the propertyrequired-deployment-contexts=[name-of-your-project]inliferay-plugin-package.properties` of each of the portlet.
Create a Liferay plugin-portlet using service-builder, put the utility classes in the service package so that the utility classes go in the [name-of-your-project]-service.jar and then put the [name-of-your-project]-service.jar in the global class-path and remove it from the WEB-INF/lib of your portlet project so that it does not conflict.
Conclusion
Use 1st-method if the code in utility classes does not depend in anyway on the Liferay API. But this would require a server restart everytime there is a change in the utility classes. Also the Utility classes could be used by Hooks since it is in the global classpath
Use 2nd-method if the code in utility classes does not depend in anyway on the Liferay API. This would not require server restart. But any change in the utility classes would require you to build & deploy all the plugin-portlets which use this jar.
3rd-method: This has the same limitations or features as the 2nd-method, just that you can use Liferay API & your custom service API in the utility classes.
4th-method: This has the same limitations or features as the 1st-method, just that you can use Liferay API & your custom service API in the utility classes.
So here I have listed pros & cons for you to decide for yourself. I would love to know if there are more ways (& much cleaner) to do this in liferay from experts.

Resources