Context You are developing a server-side enterprise application. It must support a variety of different clients including desktop browsers, mobile browsers and native mobile applications. The application might also expose an API for 3rd parties to consume. It might also integrate with other applications via either web services or a message broker. The application handles requests (HTTP requests and messages) by executing business logic; accessing a database; exchanging messages with other systems; and returning a HTML/JSON/XML response. There are logical components corresponding to different functional areas of the application. Problem What’s the application’s deployment architecture? Forces There is a team of developers working on the application New team members must quickly become productive The application must be easy to understand and modify You want to practice continuous deployment of the application You must run multiple instances of the application on multiple machines ...
There are two basic types of Dependency Injection: constructor and setter. Spring recommends constructor based dependency in most cases. From the Spring docs : “Since you can mix constructor-based and setter-based DI, it is a good rule of thumb to use constructors for mandatory dependencies and setter methods or configuration methods for optional dependencies.” Constructor DI Let’s say I have this POJO: public class MeaningOfLife { final int lifeInt; final String lifeString; public MeaningOfLife(int lifeInt, String lifeString) { this.lifeInt = lifeInt; this.lifeString = lifeString; } public int getLifeInt() { return lifeInt; } public String getLifeString() { return lifeString; } } Here, we are using the @Value annotation to pick up prop...
SQL 1. Structure Table,row,column PreDetermined Schema Create table with all the defined datatypes and size. Then you can use the table Relations 1:1,1:M,M:M 2. Nature Centralized data-all tables in the same database server 3. Scalability Vertical Increase the RAM,Storage Horizontal -> NOT good for horizontal scaling Sharding ...
Comments
Post a Comment