Foros de discusión

JS Framework choice for Liferay 6.2

thumbnail
Paco Alías, modificado hace 7 años.

JS Framework choice for Liferay 6.2

Junior Member Mensajes: 32 Fecha de incorporación: 18/12/11 Mensajes recientes
Hi!

I'm currently planning a new project in Liferay 6.2 and I'm making the decision about what JS framework to use.

AlloyUI is the trivial choice, but it does not meet my requirements, because I want a dynamic UI and I will need a lot of components that AUI does not provide. Other times I've supplied this lack with JQuery, but I've finished with a little mess of mixed plugins.

AngularJS is another typical choice. I've done some plugins with it, but I've found that MVC Portlet integration is not quite clear as I wonder and I had to do a lot of tricks to make it work (and write tons of code). The current status of Angular2 and the still small repository of components, makes me reject this choice.

React is one I've never tried out, but want to (any help would be appreciated). Same for another JS framework like SennaJS or MetalJS.

I've realised that it's not easy to find examples of JS framework integrations in Liferay.

I'd like to know your advice as experts of what framework to choose, your experiences, pros and cons. I also would like to post about it in Lifeary's blog whith the results.

Thanks in advance
Regards
thumbnail
David H Nebinger, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Paco Alías:
AlloyUI is the trivial choice, but it does not meet my requirements, because I want a dynamic UI and I will need a lot of components that AUI does not provide.


Seriously? I don't have any problems with responsive AUI. And there is a large set of widgets used in AUI and others provided by the portal. What kind of widgets are you looking for?

AUI has one advantage in the move to LR7 you'll have some insignificant changes necessary if you use AUI. Any other framework and you're going to need to include time figuring out how to add support on the new platform and leverage it correctly.
thumbnail
Paco Alías, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Junior Member Mensajes: 32 Fecha de incorporación: 18/12/11 Mensajes recientes
Thanks David for your quick response.
David H Nebinger:

Seriously? I don't have any problems with responsive AUI. And there is a large set of widgets used in AUI and others provided by the portal. What kind of widgets are you looking for?

Yes, seriously. AUI is not a top JS framework. I think is quite obvious. Take a look at, for example, this survey http://stateofjs.com/2016/frontend/

So, any more advices? Which framework would you recommend ?
Thanks
thumbnail
David H Nebinger, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
Paco Alías:
AUI is not a top JS framework. I think is quite obvious.

So, any more advices? Which framework would you recommend ?


We all know that AUI is not considered cool or relevant.

The questions you should be asking instead of "what's the shiny new thing" are:
  • What is going to have the least browser impact for users accessing my portal?
  • What can I use for development in 6 that will easily upgrade to work in 7?
  • Which framework is built to support portal (namespaced) development?


Doesn't matter what your chart says, none of those frameworks are going to deliver the right answer.

For the first question, the entire portal is based on AUI. So any JS framework you add means the user's browser is going to be loading two frameworks.

For the second question, the way JS libs loads between 6 and 7 changes so whatever you do for 6 you'll have to rework for 7. AUI is available on both 6 & 7, you just need to make some minor changes to your code and it is 7-ready.

Finally, the portal is made from a bunch of separate portlets each with their own javascript needs. In order to avoid declaring a variable, function or object in portlet A that conflicts w/ something from portlet B, AUI helps support namespacing everything so there are no conflicts. None of the libraries on the list are designed for the portal and will not offer a lick of help w/ namespacing.

It may not be cool, it may not be shiny, it may not be new, but it will work in the portal. It shares syntax similarities with jQuery, it is based on YUI so it has a wide set of widgets available and it is the most compatible JS lib you can use for Liferay development.
thumbnail
Paco Alías, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Junior Member Mensajes: 32 Fecha de incorporación: 18/12/11 Mensajes recientes
Ok David. Thanks for your response.

AUI: 1
Rest of frameworks: 0

Any other suggestions are welcome.

Regards,
Paco
thumbnail
Chema Balsas, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Regular Member Mensajes: 127 Fecha de incorporación: 25/02/13 Mensajes recientes
Hey Paco,

Although not strictly related to JS frameworks, I think the guys from ACA-IT did a good job in the past Devcon comparing several options. in their A DXP view framework comparison talk.
thumbnail
Paco Alías, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Junior Member Mensajes: 32 Fecha de incorporación: 18/12/11 Mensajes recientes
Hi Chema

Chema Balsas:
Hey Paco,

Although not strictly related to JS frameworks, I think the guys from ACA-IT did a good job in the past Devcon comparing several options. in their A DXP view framework comparison talk.


Thanks for your response. I have considered this video when making my choice. But still AlloyUI it's not powerfull enough IMHO.

Regards
thumbnail
Fernando Fernandez, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Expert Mensajes: 396 Fecha de incorporación: 22/08/07 Mensajes recientes
Hi Paco,

David is right, of course. Alloy is probably the most reasonable choice.

Personally I use Alloy but sometimes I can't resist complementing it with some jquery too. This is messy, development-wise, but it's a better experience for the users.

The main problems with Alloy, IMHO, besides not being very complete in terms of widgets, are two: poor documentation and poor backward compatibility. I think the Alloy team, bearing in mind the difficulty to "sell" Alloy based projects, should increase the priority of these two aspects.

Alloy is a good solution to use in Liferay development. It should be easier to use in development and when upgrading to new Liferay versions. Maybe this is better now with 7... I admit my experience with 7 is still limited. (changing that soon) :-)

HTH

Fernando
thumbnail
Paco Alías, modificado hace 7 años.

RE: JS Framework choice for Liferay 6.2

Junior Member Mensajes: 32 Fecha de incorporación: 18/12/11 Mensajes recientes
Hi Fernando

Completely agree with most of your points. I still think alloyui is not enough, except in terms of performance. Still looking emoticon
Let us know your experience with LR7 emoticon

Best

Fernando Fernandez:
Hi Paco,

David is right, of course. Alloy is probably the most reasonable choice.

Personally I use Alloy but sometimes I can't resist complementing it with some jquery too. This is messy, development-wise, but it's a better experience for the users.

The main problems with Alloy, IMHO, besides not being very complete in terms of widgets, are two: poor documentation and poor backward compatibility. I think the Alloy team, bearing in mind the difficulty to "sell" Alloy based projects, should increase the priority of these two aspects.

Alloy is a good solution to use in Liferay development. It should be easier to use in development and when upgrading to new Liferay versions. Maybe this is better now with 7... I admit my experience with 7 is still limited. (changing that soon) :-)

HTH

Fernando