Magento2 beta version has been released by magento for developer understanding. We can get the setup from Git Gub https://github.com/magento/magento2

You can get setup guide from http://www.ubertheme.com/magento-news/magento-2-0-installation-guide/

In Magento2 there is a drastic change in the structure of the code. All the code pools are removed and also the Skin directory. There are many changes related to the theme folder as well. To understand how the structure of Magento2 works, let us check it by creating a simple helloworld module.

Before starting the code section, let us create the directory structure that we will need.

app/code/Webmull/Helloworld
app/code/Webmull/Helloworld/etc
app/code/Webmull/Helloworld/etc/frontend
app/code/Webmull/Helloworld/Controller
app/code/Webmull/Helloworld/view/frontend/layout
app/code/Webmull/Helloworld/view/frontend/templates

You can skip the Block directory if required. Will explain it in the end of the process. For now we will also create Block directory as under:

app/code/Webmull/Helloworld/Block

Now, as we have the directory structure ready, we will now create file as per module requirement in given sequence:

1.First, we have to create the module configuration file named module.xml in app/code/Webmull/Helloworld/etc

The content for the file will be as under, if it does not depend on any other module:

But, if our module depends on any other module then we will use a tag as under

2. Now, we will create a route configuration file named routes.xml in app/code/Webmull/Helloworld/etc/frontend

3. As we have defined the route now, we will create the controller file. In Magento2, we need to create separate file for each action under the controller folder.

In our case we will create Index.php file in app/code/Webmull/Helloworld/Controller/Index

In every action file there will be a method name excute() that will be invoked when the action is called.

4. Further, we will create a Block file named Helloworld.php in app/code/Webmull/Helloworld/Block

5. Now, as we have our Controller and Block ready, we will create layout file named helloworld_index_index.xml in app/code/Webmull/Helloworld/view/frontend/layout

Here we will create separate file for each action in layout.

6. Further, we will create our phtml file that will be called named helloworld.phtml in app/code/Webmull/Helloworld/view/frontend/templates

7. Create composor.json file which will be located on  app/code/Webmull/Helloworld

8. Create registration.php file which will be located on app/code/Webmull/Helloworld

9. Now upgrade the setup using command line.

We can check the out put using www.domain.com/helloworld

As it is stated above that we can skip the block directory, we have to replace the layout xml file content with following this works similar to core/template that was in Magento 1.x

We have developed the Helloworld simple module successfully.

Cheers and Good Luck.