掲示板

Develop Liferay without SDK

thumbnail
8年前 に Piotr Swiniarski によって更新されました。

Develop Liferay without SDK

New Member 投稿: 12 参加年月日: 10/11/21 最新の投稿
I would like to initiate discussion about extending liferay without SDK.

It would be great if one day I can download liferay bundle, start it and develop custom behaviour via my web browser. Of course there are many limitations (libraries, core behaviour etc.), but during last years Liferay provided many solutions that need to be adjusted/customized.

Liferay provides mechanism that can skip SDK and whole deployment process
- template languages: velocity and freemarker
- web contents/structures/templates, dynamic data lists, categories, tags etc.
- JSON api

With current javascript frameworks, we are able to build a lot. I did many forms, "workflows", single page applications, carousels, slideshows using only web content, JSON api and angularjs. It is very quick and flexible solution (similar to WordPress Posting Source Code) especially for portal owners/administrators who don't like to wait.

There are many nice things in this approach:
- web content can be displayed everywhere (asset publisher, web content display)
- web content is asset (categorisation, scheduling, permissions, export import, staging, workflow etc)
- web content has version
- web content has translations
- web content cache
- javascript minimizing
- migration (can be also disadvantage)
- search
- and probably few more...

There are limitations:
- web content is stored as xml (escaping html/xml/javascript etc)
- not very friendly editor for custom code (can be easily changed in Liferay 7)
- and probably many more...

Question is if web content can/should be used this way? If NOT, should it be asset? Should it be service builder? Any other suggestions?

Link to few web content examples
https://github.com/piotrswiniarski/liferay/tree/master/light/web-content/6.2
Regards
Piotr
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Develop Liferay without SDK

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
I think, Piotr, that if you can come up with a way to deal with all of the issues it would likely be received well by certain quarters.

There are obvious problems that are hard to get around though. For example, having done angular portlets I can tell you that they don't work out well when you have more than one on a page and they break severely when navigating normally around the portal. Then you have the construction using your JS and various HTML fragment pages, they're not all contained in a single file so mapping to a single web content page won't work very well, you'd likely need to deal with somehow navigating between web content articles.

Loading appropriate JS libraries can be done at a theme level, so you can ensure that you have everything that may be needed for one of these pages.

LR7 may offer you an opportunity with the new alloy editor (it's less constrained than the current ckeditor) so it's more friendly, but web content is always going to be stored as xml.

Many of the Liferay APIs are available via the JSON api and you are free to add more via service builder.

But honestly I don't know that you'll be able to work around these issues w/o some extension of Liferay. For example, you could create a servlet to serve static html pages from some filesystem directory and a method to save edited templates to the directory to deal with the angular fragment issue, but that kind of thing will not be OOTB supported.
thumbnail
8年前 に Piotr Swiniarski によって更新されました。

RE: Develop Liferay without SDK

New Member 投稿: 12 参加年月日: 10/11/21 最新の投稿
Thanks David for your feedback

I was thinking about possible solution. Actually XML character of web content does not seem to be constraint (nowadays, REST based application does not require any special syntax, correct me if I am wrong). Therefore I still would like to focus on web content as application.

Just thinking out laud:
What if we want build more advance application this way:
  • web content is main source of the application (id of article is project id, and "homepage") - "main web content"
  • other web contents and "static" files (stored in document library) are connected to "main web content" with related asset functionality (therefore we can easily provide web content editor interface with hints)
  • we just need service that will provide associated files, just by passing projectId and fileName (which in the future might be OOTB


Few advantages (not mentioned in first post):
  • files and web contents can be reused in different projects
  • projects can grow (relating assets costs nothing)
  • we can display dependencies OOTB (track projects)
  • we can adjust web content editor interface to provide names of associated assets and use provided service
  • management of associated assets (for example: depending on relation type, if we delete parent asset, children can also be removed or not, etc)


Before trying to implement it, I would like to hear feedback and negative points of this approach.
thumbnail
8年前 に Piotr Swiniarski によって更新されました。

RE: Develop Liferay without SDK

New Member 投稿: 12 参加年月日: 10/11/21 最新の投稿
One more thing. i did setup project https://www.kickstarter.com/projects/1001117395/easy-programming/ Just to see feedback from community.
Cheers Piotr
thumbnail
7年前 に Piotr Swiniarski によって更新されました。

RE: Develop Liferay without SDK

New Member 投稿: 12 参加年月日: 10/11/21 最新の投稿
Hi, I developed very simple solution for liferay7ce https://github.com/piotrswiniarski/liferay/tree/master/light/OnlineApp/Liferay7
You can see demo here:
https://m.youtube.com/watch?v=9202Xt7q4Gk
I would love to hear your feedback.
If you want join/test project, here is kickstarter link https://www.kickstarter.com/projects/1001117395/onlineapp-make-own-web-applications-within-minutes