Monthly Archives: November 2023

SPRING FRAMEWORK INTRODUCTION TO SPRING CONTEXT

INTRODUCTION TO SPRING FRAMEWORK In this article we will see what the Spring Framework is, clarify the concept of Framework, introduce the Spring Context essential element in development with this framework, and finally discuss Maven and the role it takes in Spring. The learning part will be accompanied with the development of the first, simple Maven project that will introduce us to Spring Context. DEFINITION OF FRAMEWORK We have said that Spring is an Application Framework, but what are frameworks? Let's give a definition. The big advantage of frameworks is that they [...]

By |2024-11-10T16:21:15+00:00November 1, 2023|0 Comments

SPRING FRAMEWORK INTRODUCTION TO CODE INJECTION

INTRODUCTION TO CODE INJECTION DISTINGUISH BEANS BY NAME AND PRIMARY NOTATION Before discussing Code Injection let's address other topics that are also fundamental to the Spring Framework. With the code in the previous article we saw that with a Bean everything is working. However, we have to wonder if instead of having one cliente, therefore one Bean there were two? Let's test insert another Bean let's call it cliente2 and see if Spring Context can resolve and distinguish between the two Beans. We also modify the Main class and see if everything works. I report the changes to the [...]

By |2024-11-10T16:27:29+00:00November 6, 2023|0 Comments

SPRING FRAMEWORK COMPONENT ABSTRACTION

THE ABSTRACTION OF APPLICATION COMPONENTS Abstraction is a technique based on Java's interfaces that ensures the isolation of classes from their implementation. It will be clearer when we go to implement our test design. You will see a more complex project structure than you have seen until now, normally this is the structure of Spring-based projects. CREATION OF THE CONFIG PACKAGE We create the config package with the ConfigApp class inside. We've already seen the @ComponentScan notation I'll tell you again that Spring will go looking in the notifications, service, repository packages for objects to be [...]

By |2023-11-09T19:35:09+00:00November 9, 2023|0 Comments

INTRODUCTION TO SPRING MVC

INTRODUCTION TO WEB APPLICATIONS It is because of the Spring Framework that we can make Web Applications. Let us immediately clarify what Web Apps are with the support of some images. LET'S ANALYZE THE FIGURE ABOVE The moment we type an address into the browser, the browser itself uses the Internet as its medium and uses an HTTP protocol, or HTTPS when the data is encrypted, to send the request. In doing this it sends a specific request to a server, a computer that can fulfill requests, in this case we requested the index resource and [...]

By |2023-11-12T19:36:12+00:00November 12, 2023|0 Comments

SPRING MVC THE DOMAIN LAYER AND THE JDBC DRIVER

INTRODUCTION TO THE PERSISTENCE LAYER As you may remember, when we analyzed the layers of our web application, next to the presentation layer that handles requests and creates HTML, XML, JSON responses in response to the client, there is also the persistence layer whose purpose is to interface the DBMS to our application. The database can be either relational or NOSQL type such as MongoDB. In this course we will use SQL Server, then a relational database. The choice fell on this DBMS (there will also be the MySQL part) because Windows natively supports it, for [...]

By |2023-12-09T20:47:38+00:00November 26, 2023|0 Comments

CREATING A TEMPLATE WITH APACHE TILES

CREATING A TEMPLATE WITH APACHE TILES The first thing you need to do is open your Spring Tool Suite and copy the test project and paste it. The name you need to give the project is AlphaShop. Then go to the pom.xml file, change the ArtifactId to alphashop, replace all occurrences named Test1 in alphashop. We also need to set a dependency to Apache Tiles as shown in the figure. CONFIGURATION OF APACHE TILES Adding the dependency saves the project, the libraries will be updated. Now we are going to create a folder under the WEB-INF [...]

By |2023-11-16T02:52:28+00:00November 16, 2023|0 Comments
Go to Top