New Android Studio


I think Google just made all the android tutorials related with eclipse that are available on the internet obsolete just like that with the launch of the android studio.

What is android studio ?

If you are familiar with android development with Eclipse IDE and ADT  (Android Development Tools) , new android studio is a replacement for the both IDE and ADT. The stable version of the studio was released in 8th December 2014 named version 1.0.1.

In the earliest versions we had download eclipse for Java and then install android development related components via android web site.

Then Google made it easier. After that there was a eclipse version bundled with android development tools (ADT). Of course after setting up needed SDKs and related components had to be downloaded. This was much easier than eralier version because there was a AVD manager and SDK manager already installed. We just had to download a SDK we like and create an AVD and start coding. For now I did my lot of coding with this version.

Now with android studio it is much much easier. No need to download SDK or create an AVD at all.Because the latest SDK that is Lollipop (API 21 ) is already with the android studio and a sample Nexsus AVD is already created. Now you just have to download and start coding. 


But not so fast. There comes the HAXM problem. See this post to check it out.

Whats new about it ?


This may be a personal experience. But when I opened Android Studio for the first time I was amazed and a bit frightened at the same time.

1. UI is much more nicer now. Thats good. But at the same time its not exactly like same old eclipse. You have to do some round of navigation to get it right.

2. AVD seems much light weight and performance wise that is ok too. (So far :p)

3. Good VCS support is there. Its says on the developer site. Haven't tested that yet.

4. New AVD manager is cool. It allows to create devices like TV,Tablets,mobile and even wearable device.

So those are the things so far. Havent done much of coding with studio as it has been like 2 weeks its released and  this is Christmas vacation. :p If you too know anything, lets share it via comments.

Happy coding. :D


Share:

What is MVC ???

So lets just dive right in. No **** talks. Just the things needed. :P

First and foremost I have to tell you this. Most of the things I explain here (at least Im trying to :p)
I learnt by my self. No other parties. Just me and the sweet old internet spending long hours with my poor baby laptop.

Unlike other stuff, When you try to understand something like MVC without any help from others, I`ve gotta tell you thats something tedious and that will probably make you wanna quit your life, literally. So one time I stopped learning this MVC thing. But you never give up anything in life and become quitter, DO ya ???. Now after like 2 years I have build CodeIgniter, OOP MVC framework apps and ASP.NET MVC 5 apps.

Bottom line is dont quit, you will get it eventually. :D


What is MVC?? 

"MVC is Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user." 
Thats Wikipedia right there :p
Ok.Lets make it simple as possible.

Imagine you are developing a large scale application.A web application. You cant do it alone because its gigantic. Lot of developers have to work together. And lot of languages have to be integrated. Interfaces have to be written in HTML,CSS,JavaScript. For databses you will have to use SQL. For application you may have to use, C# or Java or PHP or anyother programming language that is available.

So if you don't use these things carefully separated you will have to use all these languages and developers working in one place. You will make a quite tangled ugly mess out of it. :D
Imagine a source code where HTML,CSS,JS,PHP,SQL is there. Thats just 5 languages right there. Thats a developers nightmare.If you want to have a clean neat development process you need to separate these various elements.

Thats what MVC has done. Thats it. No big deal. 

Ok lets dive hard again.

M is for Model. All the Database related things will be done here. (SQL and programming language.(eg: JAVA))
V is for Views. All the user interface related things will be done here. (HTML,CSS,JS)
C is for Controller. All the application logic is written here. (Java or PHP or C# or Python or whatever prgramming language)

When we seperate things like this we have the following advantages.

1. Database logic and UI logic and application logic is not mixe up. Simply programming languages dont mix.

2. Database people can work on Models, UI guys can work on Views and Other developing guys can work on Controllers at the same time.
 Because it is separated.


But although  M and V and C is separated from each other, in order to application to run these things have to be linked together somehow.

This is how it is done.
For example lets say we want log on to facebook and this is what happens according to MVC.(This is just the simple version)

1.You enter www.facebook.com on your browser. (according to MVC you are requesting a view.  In other words a web page)
2.Your request will go to the facebook controller.
3.Controller will send you the requested login web page.
4.Now you have the Login page (a View). You can interact with the views.
5.So you enter you email and password in the view (web page) and sends it to application. (In this case your application is facebook)
6.This respond is sent to a Controller again.
7.And controller now knows this web page needs to have some sort of database things done.
8.So the controller connects to a Model.
9. Now the Models does all the database operation. (looks for a user in the DB with given email and password)
10.If there is a user with that login, Model sends these data to the controller.

11. Now controller sends the related web page to user with those details that was recived from the model.
12. VOLA.! now you have your facebook profile page.


Take notes on these.
# Users dont intearct with Controllers and Models. They can only interact with the views.
# Contoller can be the broker between Model and Views.
# Model is not a necesity for an application to work. You can make it work with a Controller and Views. But there is no point in having an application 
without a Database.Is there ???

Thats MVC ladies and gentleman. :D
Share: