Skip to main content

Posts

E-Commerce solutions availalbe

Today, we see many eCommerce platforms already up and running. If I try to categories them based on their development cost, here we see the following cases:   Enterprise eCommerce platform like hybris, Oracle ATG Web Commerce, IBM Websphere Commerce, etc.   These platforms are massive and require many resources and budget to keep them running. These are proprietary solutions built by well-reputed companies to provide services related to eCommerce business from Front-end functionality to back-office automation.   SAAS based platform like Shopify, Wix etc  In Sass based platform, you need to pay them monthly subscription fee or commissions from your earnings, but you don't have the much flexibility to customise anything there. You can to use whatever available there and being used by others as well. But you can start a business within a few minutes, and they would take care of all online transactions related.    online market place like amazon.com, bestbuy.com, ebey.com etc. These ar
Recent posts

Handling multi-line String in java 14 Using text block

Finally, Java has introduced the feature many developers like me looking for. Handling the string which has multiple lines in it, we had to use concatenation approach to store it in a String object. It was hard to handle HTML output from java program or Servlet sometime.  For example, here was the approach to handle multiple lines of HTML output earlier. String output = "<html>\n" + " <body>\n" + " <h1>Welcome</h1>\n" + " <p>This is welcome Page</p>\n" + " </body>\n" + "</html>\n"; Now, we can handle it without concatination of multiple strings. String output = """ <html> <body> <h1>Welcome</h1> <p>This is welcome Page</p> </body> </html> """;

Generating Menu Tree Or Catagory Tree hierarchy

There has always been a basic requirements in website or web applications that the menu bar must be dynamic and all menu items should be appeared under their respected parent. Here, if you are managing the menu items in database, then you have to retrieve all menu items in the way that each menu item must have its proper position in menu tree. here you could use just a loop because you don't know that how many menu times are going to be added in future. So, Here is the example in which I am using the recursion approach for creating the menu tree dynamically for any level. there is the database table "menu_items" having the columns id , name and parent . Parent column will have the id of the parent menu as foreign key. You can increase some more columns as per your requirements like label, url and so on. There are some values already there for testing purpose.     import java . sql . Connection ; import java . sql . DriverManager ; import java . sql . Re

Getting started with Restful web service in java using jersey

Creating Restful web services in java is not a difficult task. You just use some annotation to expose you methods as web service end points. All annotations those turn your method into web services are in javax.ws.rs package. To host you web service, you can use tomcat or any web server. One thing you need to do is, configure the jersey ServletContainer servlet in web.xml for the particular url pattern. See the following example depicting the calculator service. package  pack; import  java.net. URI ; import  java.net. URISyntaxException ; import  javax.ws.rs.GET; import  javax.ws.rs.POST; import  javax.ws.rs.Path; import  javax.ws.rs.PathParam; import  javax.ws.rs.Produces; import  javax.ws.rs.core.Response; @ Path ( "/cal" ) public   class  CalculatorResource  {     @GET     @ Produces ( "text/plain" )      public   String   getDate ()   {          return   "Server date:"   +   new  java.util. Date () ;      }     @GET     @ Path

Overview of Spring Framework

Spring framework is the platform which supports for developing java applications using its infrastructure (Physical and organizational structures). Spring allows you to develop application with simple plan old java objects (POJO). Spring takes care of managing objects and their lifecycle. This framework provides the stage for your objects to play their role and all dependencies the objects depend on are provided at that time whenever required. Spring framework integrates your objects to create an application and make them independent from each other. Spring connects all objects being maintained by it by injecting their reference in each other as per requirements. Spring able to manage various common requirements for your application like database connection, transactions, emailing, orm, aop etc. For example, if you imagine a calculator application which has the following objects to accomplish its functionality: Keyboards Display Adder Subs tractor Divider Mult