fbpx
Make WordPress as Android App

Make WordPress as Android App

Make WordPress as Android App

In this article, let discuss on

Make WordPress as Android App

Make WordPress as Android App. Yes, follow the article from top to bottom and do not miss out anything. In the end you will see your website or WordPress blog in Android phone as an application.

You can also publish the app in Google Play Store or any eco-system for Android apps (Such as Amazon app store, Samsung galaxy app store, Honor/Huawei App Gallery and So on).

How to Make WordPress as Android App?

Converting WordPress blog or Website is easy if you have hands-on with Android Studio and Android SDKs.

               Yes, you need to know little bit of java coding knowledge and basics of Android application development. Do not worry if you have very little knowledge on these both should also be fine. If you follow this article carefully.

Balamurugan T

Balamurugan T

October 20, 2021

Senior Developer | Java & C#.NET | 10++ years of IT experience.

Planning to learn ReactJS or Angular or Flutter.!

How to create a file in unix – 3Minutes: Tutorial

In this video, I have explained How to create a file in unix?

(Create, edit, view and save text file using unix terminal.)

This video covers the below listed commands

  1. pwd – present working directory
  2. cd – change directory
  3. touch – to create file
  4. cat – view content of the file
  5. less – same as cat command, but opens in editor
  6. mkdir – make or create directory
https://youtu.be/xDe6OLATxQc

How to create a file in unix ?

[email protected]:~/dev/folder1$ touch hello.txt
[email protected]:~/dev/folder1$ vi hello.txt
[Edit the file] to save press Esc + :wq (w is for save and q is for quit)
[email protected]:~/dev/folder1$ cat hello.txt

Keep the learning short, not to waste your precious time.

How to create a file in unix - 3Minutes: Tutorial

Hello World!! Apache Wicket

What is Apache Wicket ?

Apache Wicket is a Web Framework provided by Apache Foundation “apache.org“.

Why Apache Wicket?

To my understanding, Apache wicket is a Component based web framework. Which provides support to create the View and Model (UI and Business Logic) very quickly and easily.

What do we need to create Wicket Application?

In order for us to build Wicket Application, we need the Libraries and IDEs.

  • Wicket Libraries – Download (at the time of writing this blog i used the Apache Wicket 7.x)
  • Eclipse IDE J2EE/WDT – Download
  • m2e – maven2 for Eclipse Plugin – How to download m2e from market place?
  • Tomcat 7 (We need a web server, to run our application to handle the Servlet/Filter Request & Response)

Note: If you are using maven to configure the project, you do not need to download the wicket libraries mentioned above, because maven will download the necessary jars required for Wicket Application.


Lets Get Start With Setting up the Workspace!!

  • Launch Eclipse
  • Create New Dynamic Web Project (New -> Project -> Other – Dynamic Web Project)
  • Give Project a Name “WicketHelloWorld”
  • Choose the Runtime and Select Apache Tomcat 7.0 (How to Setup Apache Tomcat 7 Server)
  • Click Next

    new-project

    New Dynamic Web Project

  • Do not change anything for the class source directory, Click Next

    src-classes

    No Changes, Click next

  • Make Sure you Click the Check Box “Generate web.xml”. !

    webxml

    Select Generate web.xml

  • Click Finish.
  • Your project will be created and can be seen in project explorer.

Adding Maven Dependency to the Project we created.

  • We need to add Maven Dependency to the project.
  • Right Click on the Project and Choose “Configure -> Convert to Maven Project”.

    maven-convert-project

    Groupid : your package name can be given Artifact id: Your Project Name packaging: war (Web archive)

  • Click Finish, pom file will be opened.

pom-file

pom.xml

  • We need to add the dependency for Wicket and other required libraries.
  • Click on the pom.xml tab and add the below dependency entry
      
         org.apache.wicket
         wicket
         7.7.0
         pom
      

add this into pom.xml after closing tag. and save the pom.

  • Press Alt+F5 to update the Maven dependency

    Note: You need Internet connection at very first to download the wicket library files.

  • Once your have the maven dependency downloaded, we are good to start creating our Wicket Hello World!! Program.
  • Open web.xml from WebContent/WEB-INF/web.xml

 WicketHelloWorld

 WicketFlowApp
 org.apache.wicket.protocol.http.WicketFilter
 
 applicationClassName
 in.co.aryanz.app.MainApplication
 
 
 
 WicketFlowApp
 /*
 

We have to add Filter to the web.xml, so that when we hit the URL in browser it uses the wicket filter to kick-start our application.

  • Now create new java package “in.balamt.app”
  • Create new Java Class “MainApplication.java” which extends from “org.apache.wicket.protocol.http.WebApplication”.
package in.balamt.app;

import org.apache.wicket.Page;
import org.apache.wicket.protocol.http.WebApplication;

public class MainApplication extends WebApplication {

 @Override
 public Class getHomePage() {
 // This getHomePage method will be called at first, and inorder to have our HomePage to be displayed we give the HomePage.class
 return HomePage.class;
 }

}

MainApplication.java

  • getHomePage() method is called when launching the application. so we have to provide the home page.
  • Create new package “in.balamt.pages”
  • Create New Java Class “HomePage.java” and Create New HTML “HomePage.html”

    Note: Wicket required both java and html files, also both the files need to be placed together, meaning java and html file name and location should be same.

    To be continued

How to Setup Apache Tomcat 7 Server

Setting Up Apache Tomcat 6/7/8 Server Runtime


At first we need to download install Apache Tomcat 7.

  • After Install, Open Eclipse.
  • Open Windows -> Preference and Search for “Server”

    Preference for Server

    Windows -> Preference -> Server

  • Select Runtime Environments, Click Add.
  • New Server Runtime Wizard will open.
  • Select The Apache Tomcat Version (Here i’m Selecting Tomcat 7)

runtim-select-tcat7

New Server Runtime Environment (Select Tomcat 7 or other Version)

  • Click Next
  • Name (Can be any name)
    • Apache Tomcat 7.0
  • Tomcat Installation Directory (Choose the Installation Dir)
    • C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0
  • JRE
    • Select the Workbench Default (if you want to use different JRE, change here).
  • Click Finish.

We Have Create new Runtime.

Now we need to Create Local Server

  • Windows -> Show View -> Server (Alternatevely you can User Quick Access to open Server view).
  • Create New Server

    new-server

    New Server :  Click Finish to Have default Values

     

  • Voila! We have finished the Server Setup.
  • You can startt adding the project to server and Start.