掲示板

JS Framework choice for Liferay 6.2

thumbnail
7年前 に Paco Alías によって更新されました。

JS Framework choice for Liferay 6.2

Junior Member 投稿: 32 参加年月日: 11/12/18 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

RE: JS Framework choice for Liferay 6.2

Liferay Legend 投稿: 14917 参加年月日: 06/09/02 最新の投稿
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
7年前 に Paco Alías によって更新されました。

RE: JS Framework choice for Liferay 6.2

Junior Member 投稿: 32 参加年月日: 11/12/18 最新の投稿
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
7年前 に David H Nebinger によって更新されました。

RE: JS Framework choice for Liferay 6.2

Liferay Legend 投稿: 14917 参加年月日: 06/09/02 最新の投稿
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
7年前 に Paco Alías によって更新されました。

RE: JS Framework choice for Liferay 6.2

Junior Member 投稿: 32 参加年月日: 11/12/18 最新の投稿
Ok David. Thanks for your response.

AUI: 1
Rest of frameworks: 0

Any other suggestions are welcome.

Regards,
Paco
thumbnail
7年前 に Chema Balsas によって更新されました。

RE: JS Framework choice for Liferay 6.2

Regular Member 投稿: 127 参加年月日: 13/02/25 最新の投稿
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
7年前 に Paco Alías によって更新されました。

RE: JS Framework choice for Liferay 6.2

Junior Member 投稿: 32 参加年月日: 11/12/18 最新の投稿
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
7年前 に Fernando Fernandez によって更新されました。

RE: JS Framework choice for Liferay 6.2

Expert 投稿: 396 参加年月日: 07/08/22 最新の投稿
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
7年前 に Paco Alías によって更新されました。

RE: JS Framework choice for Liferay 6.2

Junior Member 投稿: 32 参加年月日: 11/12/18 最新の投稿
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