Are you developing web application? OR building mobile app? what you commonly require is a backend providing the ability to save user data and provide meaningful insight. In addition to storage and retrieval of the data, a secured access control mechanism is required to ensure data integrity. There are multiple approaches to handle the requirement and the implementation varies based on the chosen programming language. Usually, the concepts used to solve this problem fall into following broad categories
- Proprietary Implementation (Servlets, MVC Controller, Remote Object etc.)
- SOAP services
- API development using REST
The intention of this article is to suggest some of the concepts that must be considered while designing REST API. Most of the time, my interactions with Developers and even some of the architects, led me to a realization that most people have limited or no knowledge of REST API design. Some refer merely exposing a data using either XML/JSON is REST, while some think just using HTTP methods is sufficient to build REST based API. But that’s not the entire truth.
Having worked on Java and Spring for almost a decade, my programs are naturally inclined towards using dependency injection. Recently, I started using NodeJS for developing one of our initiative and I felt modularizing my code instead of building one monolithic program. Soon, I realized that in order to keep my modules loosely coupled with each other, I need to use dependency injection and I started searching for framework. While I tumbled across many frameworks, which claims to provide Dependency Injection, none of them really fit to the expectation that I had. Also I came across many posts emphasizing that NodeJS programs do not require separate Dependency Injection frameworks and one can easily tweak require method to achieve desired results. I personally, didn’t like the suggestions and hence I thought of developing one of my own – Zander.
Up until now, REST service documentation was really painful job (believe me, I have burnt my hands with JAX-RS, JAX-WS). So called XML generated by REST hosted servers was partially helpful to understand the operations and skeleton of data structure. Beyond that, the separate documentation in order to understand the sample values and detailed information about operation was still required. Well that’s not all, even if one wants to try out the API, there was need of having separate client. Well, for all this time we continued to create beautiful documentation manually, which definitely was plagued with problems like syncing, version maintenance etc. Luckily, the problem seems to be fading away with the framework, I came across in recent times – Swagger.
While, I was working on one of the Android App, I needed a layout which offers overlay layer and provides a semi-transparent effect to view controls beneath it. In addition to the look & feel, I was also looking for a smooth transition effect to bring overlay in the view. It should also offer responsive touch to slide it out. The requirement seems to be very simple and my hunt began to implement such control. While I could able to locate many references for transition effect, none of them were perfect and had some flaws in it. The major flaw, I noticed with the implementation was that – Once an overlay view is displayed, sliding it to the right, will sometimes cause controls beneath it receiving events and yielding weird results. The rationale behind it was simple, the usage of setOnTouchListener doesn’t provide enough control over the touch lifecycle of a control and hence the touch event was getting leaked to the controls, visible one layer below.
Back in June 2015, when I left my job and thought of going for my dream, I tumbled across many ideas. As a continuation of “Selfie-social” post, I am sharing one more idea that I had – Building Ride sharing app for corporate employees. There are many ride sharing Apps are available in the market, but most of them are focused on general people coming together and planning for ride. Based on my personal experience, I always felt that the hubs where many professionals come together to work, have to go through lot of pain while commuting. Though most of them prefer to have personal vehicle, many still depend on the Public transport, taxi, trains etc. Before getting into the details about my thoughts, lets see what problems I want to put forward.
Laying on bed, eyes shut but not sleeping, a mind at peace and on the verge of building a chain of words. May be he is a poet and working on his next creation. Somewhere else, a guy was seating on the bank and there was no one around, except nature, birds chirping, sweet sound of dry leaves. The river is so calm that he finally feels relaxed. He can’t hold his thoughts and want to write a story. Hmm after all he is story writer. Not so far, another guy seating in a closed meeting room, leaning back on chair with eyes closed, thinking about software system. He wants to bring a change, he wants to really think through. His brain is solving puzzles and a stack of ideas are just building up.
Android has been on my radar for a long time, but I could never proceed with simple hello world program and few basic stuffs. From last couple of months, I have been working with both Hybrid and Native application development for Android. The experience has been enriching as I have explored lot of things in Android App Development. There are still few areas (testing, automation, profiling, game development etc.) that yet to be discovered. While developing one of the functionality, I came across a strange problem. The need was to extract an icon of any installed app and store it. Later the extracted icons must be displayed in GridView for user actions. I started using following code, to extract and save the icon
Drawable appIcon = packageManager.getApplicationIcon("com.xyz.mobile.app");
BitmapDrawable bitmapIcon = (BitmapDrawable)appIcon;
FileOutputStream fosIcon = context.openFileOutput(packageName + ".png", Context.MODE_PRIVATE);
bitmapIcon.getBitmap().compress(Bitmap.CompressFormat.PNG, 100, fosIcon);
//flush stream... close stream...
Be it a party, get together or a small meetup, people like to treasure the moments and share it over social media. Got a new dress or a gadget, visiting places or done something unusual, people like to take snaps and share it with the world.
Technology has eased many things, taking snaps is just one click away and sharing it can be done within flash of seconds. With the rise of social networking, there are now many options available to connect with the people at distant location and share memories.
Looking at the pictures, most of the people have questions like where was the picture taken? what a person is wearing or where is it available? what is the price of the gadget or the jewelry being displayed in picture? People usually prefer to post their queries as comments or sometimes may contact a person in the picture, if possible. While all this may help to retrieve the information, it is not either available quickly or sometimes remain private. Additionally, the social networking sites have to broadcast advertisements heavily to ensure the inflow of money. Sometimes the ads are not targeted to appropriate user and more prominently it annoys the viewing experience. Most of the users also seems to be demanding that the content displayed to them should be ad-free. There is also a move to have OS level ad blocking programs which prevents Mobile Apps from displaying Ads.
Whatever you want, be it in any corner of the world, the web has made it possible to order, to see it from anywhere. Every seller, brand, manufacturer have their presence over the web and are eager to market their product to the entire world. The online shopping portals are bringing wide variety of choices to consumers and promoting competition among sellers. This raises demand for ready to go market Shopping web frameworks which can be quickly setup and help businesses to go online. Nevertheless there are hosted solutions like Shopify, Bigcommerce etc., some will prefer to have a customised versions. Broadleaf is one of the ready made solution which can be customized as per the needs and deployed on either your own premise or on cloud. While few days back, I was trying to deploy it in Openshift, I came across various challenges which might be of help to others.
Due to time constraints, many people are not able to launch their personal blogs or websites. But most of them still want to have a personalized email address. The reasons could be to avoid general spam on public domain email addresses OR a dedicated email address for official reasons etc. While these reasons are valid for individuals, it might also happen that small organization having team of 5-10 people dealing in business, may still need 8-10 email accounts (the number can increase, just keep reading the article). Going for full fledge hosting plans or buying dedicated email addresses is still a costly affair. Some of the email providers charge somewhere in between $30-$40 per year, per user for dedicated email addresses. So is there an option, which is viable for smaller teams and doesn’t cost much? How about just paying for domain name registration and the email boxes are available free of cost? No need to pay for every email account for smaller teams? Rich interface to access emails online and provides decent storage space?