business logic ....refers to the domain specific logic rules,proc,and processes
presentation logic......concerned with how objects are displayed to the user of the software
MVC1 architecture combines business logic with the presentation logic, where as MVC2 seperates the two concerns. Struts framework is based on MVC2. MVC1 architecture combines business logic with the presentation logic, where as MVC2 seperates the two concerns. Struts framework is based on MVC2.
No. Logic should never go in a constructor; constructors should only be used to instantiate and initialize object data.
with single programming language we cannot do anything on the internet. Actually every application in java is divided into three layers. Presentation layer, Application layer, Data layer. Every layer has its own specification. Presentation layer role is to interact with client means presentation layer takes input from the user and send it to Application layer. Application layer is a business logic layer. All the logic is done in this layer. Data layer contains the data. for example:- suppose user enters student no. and student name in presentation layer, from here the data is send to application layer. In application layer we can write the logic for inserting, deleting, retriving and modifying the user data in database. From here the controller goes to datalayer to fetch data from database and sends the data back to user then the user see the corresponding data in the presentation layer. For presentation layer: html, jsp, velocity etc are used. For application layer: ejb, hibernate....... for data layer: oracle.......
java.lang defines the core Java language, without which all of Java would fail to operate. It is therefore the default package that must be used with every program that will run Java, as it contains all of the logic necessary for exception handling, threads, classes that represent primitives (and their associated logic), and so on.
java is similar to c/c++,easy to learn if you have some programming experience. and also the developers omitted the concepts of pointers(which are very difficult) in java When java is developed,developers want it to be simple because it has to be work on electronic devices.Where less memory is available.
MVC1 architecture combines business logic with the presentation logic, where as MVC2 seperates the two concerns. Struts framework is based on MVC2. MVC1 architecture combines business logic with the presentation logic, where as MVC2 seperates the two concerns. Struts framework is based on MVC2.
In the context of JSP, the Model-View-Controller (MVC) pattern can be implemented by having the JSP act as the View to display data from the Model (usually Java objects) and the Controller can be represented by servlets or Java classes that handle business logic and interact with the Model. The JSP page is responsible for displaying the data provided by the Controller, maintaining a separation of concerns between the presentation (View) and business logic (Controller).
No. Logic should never go in a constructor; constructors should only be used to instantiate and initialize object data.
Some advantages are:SimpleEasy to learn and useProvides rich UI features through support for CSS, HTML and Java ScriptProvides support for business logic through support for java code
There can be a few different reasons for doing this. One is to separate the actual work being done and who is doing it. Have a business logic developer working independently from a creative web developer. Another reason would be for re-use. Developing reusable business logic components makes sense, instead of embedding that logic where it can't easily be reused in the front end.
Java 2 Platform, Enterprise Edition (J2EE) is a set of specifications that extend the Java Standard Edition (Java SE) to provide a robust platform for developing and running large-scale, multi-tiered, distributed, and transactional enterprise applications. JavaServer Pages (JSP) is a technology within J2EE that enables the creation of dynamic web content by embedding Java code directly into HTML pages. JSP facilitates the development of web applications by allowing developers to separate the presentation layer from the business logic, making it easier to maintain and scale applications.
with single programming language we cannot do anything on the internet. Actually every application in java is divided into three layers. Presentation layer, Application layer, Data layer. Every layer has its own specification. Presentation layer role is to interact with client means presentation layer takes input from the user and send it to Application layer. Application layer is a business logic layer. All the logic is done in this layer. Data layer contains the data. for example:- suppose user enters student no. and student name in presentation layer, from here the data is send to application layer. In application layer we can write the logic for inserting, deleting, retriving and modifying the user data in database. From here the controller goes to datalayer to fetch data from database and sends the data back to user then the user see the corresponding data in the presentation layer. For presentation layer: html, jsp, velocity etc are used. For application layer: ejb, hibernate....... for data layer: oracle.......
A java servlet is the heart of a Java Enterprise web application. It contains most of the business logic that the web application needs. The initial web application technologies did not have capabilities to support dynamic contents in a secure and efficient way. Java Servlets were created to address this drawback. Servlets are used in many types of Java EE applications using technologies like Struts, MVC etc.
Business logic refers to the part of the program that encodes the real world business rules.
java.lang defines the core Java language, without which all of Java would fail to operate. It is therefore the default package that must be used with every program that will run Java, as it contains all of the logic necessary for exception handling, threads, classes that represent primitives (and their associated logic), and so on.
java is similar to c/c++,easy to learn if you have some programming experience. and also the developers omitted the concepts of pointers(which are very difficult) in java When java is developed,developers want it to be simple because it has to be work on electronic devices.Where less memory is available.
Servlets and JavaServer Pages (JSP) are both components of Java EE used for building web applications. They both run on a server and can interact with client requests and generate dynamic content. The key difference is that servlets are Java classes that handle requests and responses programmatically, while JSP is a markup language that allows developers to embed Java code within HTML, making it easier to create the user interface. Servlets are typically used for business logic, while JSP is more focused on presentation.