Posts

Framework vs Toolkit vs Library vs Components vs Classes

Framework is collection of toolkit with a programming model imposed on the developer.  Framework provides pre-defined structure and dictates the flow of control in the application. It follows the "Inversion of Control" principle, where the control flow is inverted compared to traditional programming. They offer predefined structures and follow specific patterns and operate within the confines of those patterns. Toolkit is set of related libraries as a subsystem. A library is collection of related components and classes organised as a single entity.   Libraries are like collection of tools in a tool box that you can use over and over again in your computer programs. Each tool is a set of functions or pieces of code that can be used for specific tasks. They come with a clear set of instructions (API) that tells you how to use them. They don't care how and when you use them. A component is class with more than one interface. A class is a type with default interface (Every pu...

Agile Scrum Method

Agile is an iterative and incremental approach to software development that emphasizes flexibility, collaboration, and customer feedback. It involves breaking projects into small increments called "sprints," which typically last from one to four weeks. This methodology prioritizes delivering working software frequently, often every few weeks, and encourages adaptability to changing requirements throughout the development process. Agile teams collaborate closely with stakeholders, continuously refining and improving the product based on feedback and evolving needs. Scrum is agile framework for managing and organising work especially in software development. It provides a way for team to collaborate and deliver high value product iteratively. Key concepts Sprint Development cycle in scrum are called sprint. Those are short periods (mostly two week ) where shippable product increments are created. Artifacts Product Backlog: A prioritised list of features, enhancements and bug fi...

Supportive References

  Jenkins https://www.youtube.com/watch?v=6YZvp2GwT0A https://www.youtube.com/watch?v=Ri-URt8gPCk Functional Programming Martin Odersky https://www.youtube.com/watch?v=W2dCFq7MplE Machine Learning https://www.youtube.com/watch?v=4UJelID_ICw Scrum https://www.youtube.com/watch?v=XU0llRltyFM https://www.youtube.com/watch?v=vuBFzAdaHDY https://www.youtube.com/watch?v=GR9-8lOUhwA WPS Office Complete office suite with PDF editor https://in.docworkspace.com/d/sIPawuo2wAZHQkasG https://kso.page.link/wps

Shortcuts

Shortcuts in IntelliJ psvm - public static void main(String[] args) sout - System.out.println() fori - for loop iter - enhanced for loop ifn - if null inn - if not null else - else statement try - try-catch block thr - throw new exception sysout - System.out.println() syserr - System.err.println() psf - public static final psfi - public static final int psfs - public static final String newc - create new class newi - create new interface

Git

Image
  Git is distributed version control system which is free and open source software (FOSS). It is a tool to track the changes in the code. We save an initial version of code in the git and then update over the time. We can look back all the changes done so far. Github is the website to host the repositories online. Once we have made changes local repository on the computer and ready to put in git, we need to tell git to track them through add command, save file through commit command and then upload the changes to remote repository using push command. Thus we can keep track the version history and also isolate the changes. SSH (Secure SHell protocol is used for authentication and it is secure and convenient way to log into remote servers) keys need to be generated which consists of pair of keys, private and public keys. Public key is shared with the world via GitHub while the private key is kept secured on one's computer. When we try to connect with GitHub, SSH client provides priv...

Servlet

Servlet is java server side technology, which processes the request from the client. To create a servlet we have to either extend Generic Servlet and override its service method or extend HttpServlet if its is web application and override doPost or doGet Methods. When a request from the client maps the servlet url , the container checks whether the servlet instance is already created. If not, it loads the servlet and creates the object, instantiates it by calling  init   method . Then calls the service method. Between each request it calls the  service   method . when the application is closed, container calls  destroy method .  There are listeners such as web context , session etc that monitor the life cycle of the servlet and react by calling a method of listener object when an event occurs. The container responds to the servlet exceptions by generating a default page showing Servlet Exception occurred.  But we can specify the error page. An example ...

Generating PDF Document Using iText

Image
iText is an open source library that allows programmers to create and manipulate PDF.  It enhances applications with dynamic PDF document generation or manipulation.  iText is available in Java,Dot Net and Android.  Download the itext core binary from the web page  http://sourceforge.net/projects/itext/ .  Create a new Java project in Eclipse and ass iText library (jar file) to your class path. import java.io.FileOutputStream ; import java.util.ArrayList ; import com.itextpdf.text.Document ; import com.itextpdf.text.DocumentException ; import com.itextpdf.text.Element ; import com.itextpdf.text.Font ; import com.itextpdf.text.Paragraph ; import com.itextpdf.text.Phrase ; import com.itextpdf.text.pdf.PdfPCell ; import com.itextpdf.text.pdf.PdfPTable ; import com.itextpdf.text.pdf.PdfWriter ; public class PdfOutput { // Folder path to store PDF file private static String FILE = "f:/sandhya/OUTPUT/First.pdf" ; private static Font catFont = new Font(Font...