Producer and Consumer: Java EE Enterprise Edition
Producer and Consumer: Java EE Enterprise Edition
Listening to music, watching movies, eating, buying clothes are all consumer
activities. צרכן-
On the other hand, composing music, developing a software, cooking food are
producer activities. – יצרן
Front End
The developer should have the knowledge of HTML, basic CSS & JavaScript.
Besides these fundamental technologies, companies prefer to use frameworks
such as React, Angular, Vue etc. to write their front end module.
Web Server: it can handle HTTP from client browsers and respond the request
with an HTTP Response.
A web server understands HTTP language and runs on HTTP protocol.
Apache Web Server is kind of a web server and then we have specific
containers that can execute servlets and JSPs known as the servlet container,
for example, Tomcat.
Apache Tomcat Server
JSPs, like servlets, are server-side programs run inside a Java-capable HTTP server. Apache Tomcat
Server (@ http://tomcat.apache.org) is the official reference implementation (RI) for Java servlet and JSP,
provided free by Apache (@ http://www.apache.org) - an open-source software foundation.
So, they are helper applications that resides \מתגוררat web server and build
dynamic web pages. A dynamic page could be anything like a page that randomly
chooses picture to display or even a page that displays the current time.
So, we can say that the Application server is a web server with additional
functionalities to help developers with enterprise applications.
Web Application(webapp): I would refer this as webapp in this guide.
Basically, the project is your web application, it is the collection of
servlets.
OOPs
Object Oriented programming is considered as one of the best programming
paradigms out there. Java is an OOP based language. And using it to create
apps make them more modular, flexible and supports extensions.
Powerful and awesome tools and APIs
It has a great collection of Open source libraries and APIs. These tools make
development with Java faster, easier and cost-effective as well. The tools
and frameworks and APIs are a good reason for selecting to learn Java.
Platform independent
Java’s tagline says it all- “write once, run anywhere”. It supports cross-
platform and can run on almost every platform. This is one of the reasons
Java is still in use to write applications for Linux and Windows
environments.
Spring- The most famous framework for enterprise java, it is used to create
high functioning, reusable code in java. It is lightweight and can be used to
write any java application.
We can build an application without server side-BackEnd- just front end with
the data base , so we can use that when we don’t need to do a lot of
calculations.
It can be more than server-side – why ?
Data Base
Data Base – אמצעי לאחסון של נתונים בתוך המחשב בצורה מסודרת ועקביתthe application development
universe that are Mongo DB & MySQL. Mongo DB is a document-oriented NoSQL
database & MySQL is a relational database.
DBMS(DATABASE MANAGEMENT SYSTEM) - ( Oracle,NoSQL -> MongoDB, MYSQL..)
– מערכת תוכנה לניהל בסיס נתוניםclient side
מקשר בין מסד הנתונים המכיל נתונים גולמיים לבין האפליקציה שצריכה את הנתונים
creating and managing databases. The DBMS provides users and programmers with
a systematic way to create, retrieve, update and manage data.
It not only provides a Maven central library to organize all third-party Java
JAR files but also downloads the dependency for any Java project
automatically at the build time. Which means you don’t need to manually
download your JAR files and deal with several errors related to version
mismatch e.g. UnsupportedClassVersionError.
For example, if your project is dependent on Spring 5 then it will not only
download the Spring 5 JAR files from maven central library but also all
dependent JARs required by Spring itself. This is known as transitive
dependency management.
Monolithic applications
is built as a single unit. Enterprise Applications are built
in three parts: a database (consisting of many tables usually
in a relational database management system), a client-side
user interface (consisting of HTML pages and/or JavaScript
running in a browser), and a server-side application.
So which app give me the app.ear from the app.java ?
Maven (build tools)
Example : person.java - > compiled to person.class and all this in
archives קיבוץto person.ear
In app.ear there is .war files and .jar files
So there is 2 container’s – (web container and Business container) only and
the one database for both.
The first container is for .war’s
o a WAR file is an archive that contains all the parts of a web application:
Java class files for servlets and web services, JSPs, HTML pages, images, and
other resources. The WAR file is simply a JAR file (which is itself a fancy
ZIP file) with specified directories for the Java code and one designated
configuration file: the web.xml file, which tells the application server what
to run and how to run it. WAR files always have the extension .war, but they
can be created and read with the standard jar tool.
o Security and Authentication
One of the most powerful features of web app deployment with the Servlet API
is the ability to define declarative security constraints, meaning that you
can spell out in the web.xml file exactly which areas of your web app (URL
paths to documents, directories, servlets, etc.) are login-protected, the
types of users allowed access to them, and the class of security protocol
required for communications. It is not necessary to write code in your
servlets to implement these basic security procedures.\
The second is for .jar’s – (is like Put Jar file into a folder and package as
zip).
For each specific .war there is specific .jar
The request come from the http server\restAPI in form (.xml\Jason) and the
.war can deal with it and change it to java form and send it to the .jar that
belongs to him.
שהיא פורמטXML שהיא בכלל בשפת סי או רוביץ על ידי קבציrequest יודע לדבר עם הWAR בקצרה איך קובץ
והXML לכן ה ריקויסט שולח קובץ מה הוא רוצה ב.XML הכתובה על ידי תגיות כך שכל השפות שבעולם מוסכם שהם יודעים
.JAVA CODE יודע מה הוא רוצה ומעביר אותו לWAR
כך שהוא יודע לקחת קובץHTTP וה ריקויסט נשלח על ידי פרוטוקול ה תקשורתCUNSUMER בנויה בREQUEST.XML
ומעביר אותו לצד הנכוןXML
JAR ובכך הוא יש לו את הריקויסט בגאווה ויכול לשלוח לXML ->.JAVA. עושה לו תרגום מ, WAR מגיע לXML הקובץ
על תנאיDB יכול לבצע את הפעולה או את הבקשה ואם מבוקש ממנו לקחת משהו או לעדכן משהוא בJAR ובכך קובץ,הנכון
. לכן הוא עושהDB רק שיש לו אישור לגשת ל
מה קורה לאפליקצייה שלי ?< היא לא עולה,JAR אם יש בעייה באחד מקבצי ה
גאריים לפני שהוא מעלה. ברמה קלאסייםVALIDATION עושהAPPLICATION SERVER למה ? כי ה
..JAR שיש שגיאה בEXEPTION > זורק- האפליקצייה
Microservices
independently.
כלומר, DOCKER בתוך הREST API הפך עכשיו לMONOLITHIC בWAR בעיקרון מה שהיא התפקיד של ה: בתמונה
DB – והXML. ספציפי שאחראי על האבטחת קוד שלו ועל התרגום – דרךJAR ששייך לAPI אתDOCKER יש לנו בתוך ה
.ששייכת לו
So which software architecture suits your solution and your business best?
Choosing a monolithic architecture
Small team. If you are a start-up and your team is small, you may not
need to deal with the complexity of the microservices architecture. A
monolith can meet all your business needs so there is no emergency to follow
the hype and start with microservices.
A simple application. Small applications which do not demand much
business logic, superior scalability, and flexibility work better with
monolithic architectures.
No microservices expertise. Microservices require profound expertise to
work well and bring business value. If you want to start a microservices
application from scratch with no technical expertise in it, most probably, it
will not pay off.
Quick launch. If you want to develop your application and launch it as
soon as possible, a monolithic model is the best choice. It works well when
you aim to spend less initially and validate your business idea.
Afterword
If your business idea is fresh and you want to validate it, you should start
with a monolith. With a small engineering team aiming to develop a simple and
lightweight application, there is no need to implement microservices. This
way, a monolithic application will be much easier to build, make changes,
deploy, and provide testing.
If your development team does not have the microservices expertise, you can
find a software development partner with hands-on experience in building a
microservices architecture. Many successful tech companies already outsource
their microservices development to the foreign IT vendors. If you consider
following their strategy, just contact our experts to learn the details.