Building a Webapp Store

So I have been silent for some time. Mainly due to deep diving into new territories since I left Oracle. Now I think it is time to put my new skills to some work and test them out. To that end, I thought that I need to build a webapp project for myself. Just to assert what I am learning and to learn even more from hands on practice.

My Debian Wheezy Web Hosting Image for the odroid u2

How to download an artifact from Nexus repo via curl using REST API

So I can't take credit for the curl solution. The following script was a result of various stackoverflow searches to see why it wasn't working. In the end the curl command had to look like below and work in 2 steps to download the artifact I needed.

The below script assumes the following:

Installing alternative java on Ubuntu

When installing an alternative java on ubuntu, this is what you need to run approximately (The number 1 denotes your preference for this alternative whereby 1 is the highest and any other greater number is last preferred) :

 

Search for a Schema

So now that we have a backend, we need to store something in our backend. For that we need to have a schema for our domain. What is our domain ? Excellent question, not sure yet. But a customer and perhaps products he orders seem to be a good enough choice to begin with. I am currently working for a telecommunication company, so am seeing a lot of customers and orders. Thereby this should be no surprise. But aside this point, pretty much every webapp has customers and orders in some form. So we should have some good learning opputunity here.

The Database Backend

The first thing that any webapp needs is a persistance storage. Generally speaking Oracle databases are generally a very safe choice. But for small and medium based businesses this can result in prohibitive costs. Mysql/MariaDB is a popular choice here and is running most of the web. But at this point I am deciding against the popular choice and going for Postgre. The main thinking and reason being that Postgre is considered very close to an Oracle DB. Hence later if I wish moving my schema over to an Oracle DB is generally considered do-able.

Memory Profiling for Novices ( Heap OutOfMemory OOME error )

So sometimes out of memory errors crop up in you application. But to troubleshoot these should not be that complicated. Let me show you with Oracle's Visual VM, how you can quickly get down to the root cause of your out of memory errors. All you need Oracle's Java JDK installed on your system and the VisualVM tool that comes with it. At the time of writing the version I used was with JDK 8 (1.8.0_144). On a Mac OSX system all you need to do is type "jvisualvm" on your terminal and it will just popup. If you have your paths properly setup under windows and linux, it should also just work.

Lambda Recipe for attribute validation of Collection of POJOs

So here is a recipe you can use to validate a POJO attribute for some value. In my case I will show you how to check if attributes were set to null. But you can expand on the example as an exercise for yourself.

So here is the template method for a single object and a collection of objects:

Gradle System Commands Cheatsheet

So I was reading this book "Gradle in Action" and thought I'd jolt down the more interesting technical niceties here. For your theory part I would recommend reading the book. The source code though is available freely for the book on github.

My Git Cheat Sheet

Following is my cheat sheet that I extracted while reading the git tutorial git-scm.com. So I just listed the commands minus all the text there. If you have read the book than below will a quick reminder of the various commands there. Not all commands are listed but the more interesting only.

Pages

Subscribe to Ahsan's Corner RSS