How sandeepkumar-s-18/xenzkart--full-stack-project works
Project Type and Purpose
• XenzKart is a Java‑based, full‑stack, e‑commerce web application.
• It follows a classic three‑tier MVC architecture (Presentation, Business/Controller, Data).
• Users (shoppers and admins) interact through JSP/HTML/CSS/JS pages; server‑side logic lives in Servlets and JavaBeans; MySQL stores persistent data.
Main Components
a. Client Layer (Frontend)
• Web Browser
• Static assets: HTML, JSP pages under web/Pages and build/web/Pages
• CSS files (web/css) and JS files (web/js)
b. Web Server / Application Server
• Apache Tomcat or GlassFish
• WAR deployment (dist/MyProject.war)
• build.xml and Ant scripts manage compilation and packaging
• WEB-INF/web.xml configures Servlets
c. Controller Layer
• Servlet classes (src/java/com/MyServlets)
• Handle requests: LoginServlet, CartServlet, PlaceOrderServlet, etc.
d. Business / Model Layer
• JavaBeans (src/java/com/MyJavaClass): CartBean, ProductDataBean, LoginDataBean
• DAO/DB helpers (src/java/com/MyDb): DbConnector, RetrievingData, AddToCart, UpdateRecord, etc.
• Interaction via JDBC and mysql-connector-java.jar
e. Data Layer
• MySQL database (xenzkart.sql)
f. External Libraries & Tools
• cos.jar for file uploads
• mysql‑connector‑java.jar for JDBC
• NetBeans IDE, Ant build scripts
Relationships & Data Flows
• User action → HTTP request to a Servlet (configured in web.xml)
• Servlet (Controller) invokes DAO methods in MyDb package to perform CRUD on MySQL
• DAO returns JavaBeans (POJOs) to Servlet
• Servlet sets beans as request attributes and forwards to JSP (View)
• JSP renders dynamic HTML + CSS + JS → HTTP response returned to browser
• Static assets (CSS, JS, images) served directly by the web server
Architectural Patterns & Principles
• MVC: JSP = View, Servlets = Controller, JavaBeans/DAO = Model
• DAO pattern for decoupling database operations
• Layered architecture: Presentation, Business, Data
• WAR packaging for modular deployment
Practical Steps for the Engineer
2. JSP and static assets in the Client tier; group them by web/Pages, web/css, web/js.
3. In the Web/App tier, list all Servlets under “Controller Layer” and show web.xml mapping.