In this tutorial, we will be creating a simple “Hello world” program using Struts 2. For this tutorial we will be using Eclipse, Struts 2. Struts 2 allows you to define configuration either by using traditional Struts 1 like XML way or by using annotations. In this tutorial we will be following traditional XML way. Let’s move ahead! Continue reading Struts 2 Hello World Example (XML Version)→
As discussed in this and this post, Symfony 2 is a web application framework. In Symfony 2 we organize our code in form of bundles. You can think bundle as collection of all code. Say if your app has a front-end, a back-end and an API then you can create three different bundles one for your front-end, one for your back-end and one for API. This will allow your to manage code efficiently.
Symfony 2 is flexible and it allows you to have as many as bundles you want in your app. Let’s understand this bundle system in detail by creating a bundle.
As a programmer you do develop every application on your machine first and then you test it on same machine and then you push it to remote test/production environment. You are developing a Facebook app and your requirement is user must login to use the app. Now you are ready with local environment, you have created a new project in your powerful IDE, you have downloaded the SDK, you are done with creating a new app in FB developer, now you are trying to add app domains to get access to FB’s oAuth API. Hmm….. Something went wrong!… Facebook is not allowing you to use ‘localhost’ as app domain. Now what to do? Here is solution.
If you have ever tried to modify precompiled android application, then you might be familiar with APKTool. APKTool is one of the most commonly used application to decompile and recompile android apk.
But there is a drawback with this APKTool. You can only decompile or recompile your apk, but you cannot edit the content, more specifically the source code. Generally the whole source code is compiled in .smali files and to edit that files you have to rely on some other compiler, decompiler and editor like Notepad++.
To combine all this things together and to make development easy, an XDA user, Vaibhav, created APK Studio.
As the name suggest, the APK Studio allows you to decompile, edit and recompile apk files right from one single app. This IDE looks quite similar to Netbeans IDE and has a lot of features to explore.
Symfony 2 is a PHP framework. When you download it, if noticed, Symfony 2 has a directory structure. By default there are 5 directories like app, bin, src,vendor, web. If you had developed any kind of application with Symfony 2 then you might have followed something like put your source code in src, put all static assets in web, write config files in app etc. Again this directory structure is configurable, that means you can customize it according to your project needs. Even though the directory names are self-explanatory, let’s have a deeper look of this structure.
By default Symfony consists of following directories,
app/: The application configuration
src/: The project’s PHP code
vendor/: The third-party dependencies
web/: The web root directory
‘app’ directory in Symfony 2 holds the application configuration. You can find all configuration related stuff in ‘app/config’ folder. If you need to configure your database or Swiftmailer then you will need to change parameters/settings from here. Apart from that this directory holds the ‘cache’. While writing code in Symfony 2 you will be working with lots of files ranging from xml, yml to php, twig, html etc. Controllers will be written in some file, routes will be defined in some another files, views will be written in some other file and so on. So while serving request Symfony has to read all these necessary files. Since the count of files is too high, to achieve great performance Symfony 2 has inbuilt caching. And this cached data will be stored in ‘cache’ directory. Again there is a ‘log’ directory which has debugging related data, especially useful in development.