تطوير تطبيقات الويب على البوابة المضمنة

تعد بوابات Java فئة خاصة من تطبيقات الويب التي تتيح لك تطوير أنظمة معلومات معقدة إلى حد ما وتشبه أنظمة إدارة المحتوى (CMS) ، ولكن لقطاع الشركات. هذا يعني أن لديهم عادة القدرة على العمل مع التسلسل الهرمي للصفحات والتطبيقات والمستخدمين والعمليات وتدويل مدعوم ، وهناك وسائل للتكامل في البنية التحتية لمعلومات الشركة. 

في سوق هذه الأنظمة ، هناك منتجات تجارية من شركات معروفة مثل Oracle و SAP و IBM (الآن HCL Technologies Ltd) و Red Hat JBoss ، وبالإضافة إلى ذلك ، هناك أيضًا بوابة Liferay بإصدار لائق مفتوح المصدر ، بالإضافة إلى أنظمة البوابة التعليمية وغيرها من أنظمة البوابة الموجهة نحو الموضوعات ، لا توجد بوابات تمامًا ، ولكن توجد أنظمة معلومات تدعم تقنيات البوابة مثل DMS Alfresco. تعني الداعمة أنه من الناحية النظرية يمكن تثبيت التطبيقات المطورة لنظام واحد على نظام آخر ، ولكن في الواقع لم يكن هذا هو الحال تمامًا. أضاف المصنعون ميزاتهم الخاصة التي كانت غير متوافقة مع الآخرين ، مما ترك هذه الميزة التي لا مثيل لها غير محققة.

يقلل العديد من الخبراء من أهمية قابلية التشغيل البيني بين التقنيات والمعايير. بشكل عام ، قد يكون تنظيم تطوير البوابات أمرًا صعبًا لفترة طويلة ، لأن يستمر العديد من البائعين التجاريين في العيش في عوالمهم المغلقة ويكسبون المال بشكل عام من حل مشكلات المطورين. كانت البوابات نفسها ، الموجهة للعمل مع حمولة صلبة ، لديها أيضًا متطلبات نظام لائقة للماضي. يمكن أن يتحسن الوضع بشكل كبير مع إصدار معيار تطبيق Portlet 3.0 ، واليوم سنحاول إنشاء عملية عالمية ومريحة نسبيًا في نفس الوقت لتطوير التطبيقات لأنظمة البوابة.


“”, . .

java . Portlets 1.0 , Portlets 2.0, Portlets 3.0. 

, - - ;). npm spring-boot . .. SPA , “ ” . , . : JSON , , , xml-, . 

, -   -. .. java , Spring, Struts, Faces, Jersey . PHP Ruby.

WSRP . 

. 4- . .

Java , “” .

Apache Pluto, , .. .

.

Unix-like Windows git shell . git cmd.exe

git clone https://github.com/apache/portals-pluto

. , - , 8 ant. .

mvn package

ant -f dist-build.xml -DpackageOnly=true

-DincludeDemos=true , - , demo/pom.xml build

<finalName>${project.name}</finalName>

Windows pom.xml,.. -

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-gpg-plugin</artifactId>
  <version>1.6</version>
  <configuration>
     <skip>true</skip>
  </configuration>
</plugin>

target/dist , . , .. .

pluto-3.1.1-SNAPSHOT-bundle.tar.bz2

.

, :\projects

cd c:\projects
tar xvjf c:\portals-pluto\pluto-3.1.1-SNAPSHOT-bundle.tar.bz2

cd pluto-3.1.1-SNAPSHOT

bin\startup.bat

startup.sh .

, . 

, :

tail logs\catalina-.out -f

Windows .

org.apache.catalina.startup.Catalina.start Server startup

, ,

http://localhost:8080/pluto

- pluto .

.

, , Apache Pluto , , , , Liferay WebSphere/HCL DXP. 

Pluto Admin, .

http://localhost:8080/pluto/portal/Pluto%20Admin

demo, , .war webapps/

. maven, . windows M2_HOME M2_HOME\bin Path.

cd projects
mvn archetype:generate -DarchetypeGroupId=org.apache.portals.pluto.archetype -DarchetypeArtifactId=mvcbean-jsp-portlet-archetype -DarchetypeVersion=3.1.0 -DgroupId=com.mycompany -DartifactId=hello-portlet

- Enter.

pom.xml .

<finalName>${project.name}</finalName>

.

, .. pluto .

cd hello-portlet
mvn -Ppluto package

, , . .. “” .

pluto liferay-cdi liferay-spring, Liferay . .. .. , .

target/’ Java- .war .

.war webapps.

- .

.

, Firefox, Chrome. - , , , .war webapps/ . , , .

, , , , , . VIEW render , EDIT, HELP . “ ” == “ ”. .. . . ( ) , , , .

hello-portlet/ maven IntelliJ IDEA. , gradle , .. . maven.

, MVC .

, .. , portletName portletNames. , Portlet .

:

@Inject - -

@RenderMethod -

@ActionMethod - GET, POST “ ”

@ServeResourceMethod - JSON

- actionName, id. 

WAR , ..  

src/main/webapp/resources

@RenderMethod(portletNames = "HelloPortlet", include = "/WEB-INF/jsp/helloView.jsp")

<portlet:actionURL var="placeOrderURL" name="placeOrder"></portlet:actionURL>

<portlet:resourceURL var="getSettingsURL" id="getSettings"></portlet:resourceURL>

rest .

request.setAttribute JSTL (.. ) JSP

<%
   String ctxPath = request.getContextPath();
   List<String> settings = (List<String>) renderRequest.getAttribute("settings");
%>

, . , . .

, <portlet:namespace> contextPath .. id , , , .

, . React, Angular, Vue . -, .. . skinny-widgets (https://www.npmjs.com/package/skinny-widgets) - .   

GET public render parameters

@PortletConfiguration(portletName="portlet1", publicParams = {"categoryId"},
 … {   } 
)

POST , .

RenderURL renderURL = resp.createRenderURL();
MutableRenderParameters renderParams = renderURL.getRenderParameters();
String idString = renderParams.getValue(name);

Liferay ( ) , .

multipart

Part part = request.getPart("image");

“ ” , . , @PortletConfiguration, .

, PortletPreferences, .. . Apache Pluto , Liferay .

@PortletConfiguration portlet.xml, .

“ ”, demo/ . “ ?”, “ ?”.

, .. , , weld, jandex 1.2.2.Final lib/

, . , , .

- : http://bitbucket.org/finistmart

JAX-RS - MySQL c Postgres. 

: ;) .

, .

Pluto Liferay ( i7 2 U 8 Gb RAM , liferay, , ;) .

Liferay, , sourceforge.net 

في Liferay ، يتم طرح طهاة المدخل في النشر / ، وطهاة الخادم في tomcat-xyz / webapps وللتطوير المريح في portlet-ext.properties ، تحتاج إلى إضافة معلمات (يمكن البحث عنها عبر Google) لتعطيل التخزين المؤقت المتنوع . بعد بعض التغيير والتبديل ، يمكن أن يكون خيارًا جيدًا للتطوير أيضًا.




All Articles