My First Project

This is a simple project to build a personal blog. We will look at fundamental development methods.

Analysis

Create a system for managing your personal blog. There will be sections to manage categories and blog posts. There will be a page that displays all blog posts in pagination, as well as a detail page for each post where end users will be able to leave comments that will be displayed publicly once approved.
 

Arrange:

So, here's how the project will be created.

Sl.RequirementsMethodTechniqueEstimation
1 Create admin panel navigations Interface Builder XML 5 Minutes
2 Category Management CategortySet XML 5 Minutes
3 Post Management InformationSet XML 5 Minutes
4 Create Configuration Options Site Settnigs XML 5 Minutes
5 Beautify Web Address Page Router XML 5 Minutes
6 Create a model for the comment's database table. MVC PHP 3 Minutes
7 Develop a frontend that shows blog post details and list views. MVC PHP 20 Minutes
8 Develop a frontend for comment submission and viewing. MVC PHP 20 Minutes
9 Manage comments in the admin panel. MVC PHP 20 Minutes


Action:

Le's go through each step one by one.

1. Create admin panel navigations:

The admin panel navigation is managed by Interface Builder, which is controlled by basic XML code. Create a new file blog.xml in below location.

development/definition/interface_builder

In blog.xml, paste the following code.

<?xml version="1.0" encoding="utf-8"?> <InterfaceBuilder> <navigation name="blog"> <parent> <title>Personal Blog</title> <action /> <submenu /> <acl> <group>superadmin</group> </acl> <sort_order>7</sort_order> <icon /> </parent> <child> <!-- All Menu goes here --> </child> </navigation> </InterfaceBuilder>

Note: The navigation name "blog" is one of the most important elements in the mentioned XML that will be utilized for generating a page and other connections.

Now, log in to the admin panel, and you'll notice a new tab called "Personal Blog" has appeared.

To have a better understanding, watch the video below.

2. Category Management:

To maintain blog categories, we'll now use CategorySet. Go to the below location.

development/definition/category_set

Create the below XML

<?xml version="1.0" encoding="utf-8"?> <CategorySet> <base> <version>0.1.0</version> <lastupdate>2023-12-01</lastupdate> <title>Blog Category2</title> <admin_tab>blog</admin_tab> <parameters/> <description>Yes</description> <image> <status>No</status> <type>Single</type> </image> <haschild>Yes</haschild> <generic> <status>Yes</status> <title>Sort Order</title> </generic> <sreach> <status /> <field-selected /> <parma-link> <type /> <uri /> </parma-link> </sreach> </base> </CategorySet>

The system is ready to manage categories. Now, open the blog.xml file as indicated in step 1 to edit the Interface Builder and update the Amin Panel Menu.

<?xml version="1.0" encoding="utf-8"?> <InterfaceBuilder> <navigation name="blog"> <parent> <title>Blog</title> <action>/category/manage/blog-cat</action> <submenu /> <acl> <group>superadmin</group> </acl> <sort_order>4</sort_order> </parent> <child> <menu> <title>Blog Categories</title> <items> <item> <title>Add Category</title> <link>/category/manage/blog-cat/add</link> </item> <item> <title>Manage Categories</title> <link>/category/manage/blog-cat</link> </item> </items> <adminicon> <type /> <location /> </adminicon> </menu> </child> </navigation> </InterfaceBuilder>

Watch in video

3. Post Management

To manage blog posts, we will need a customized database table linked to the category. We will use InformationSet to manage the content.

Go to development/definition/information_set and create blogpost.xml with the below content.

<?xml version="1.0" encoding="utf-8"?> <InformationSet> <base mode="db"> <version>3.1.0</version> <lastupdate>2013-12-23</lastupdate> <title>Blog Post</title> <admin_tab>blog</admin_tab> <addons /> <parameters /> <max_entry> <limit></limit> <message><![CDATA[]]></message> </max_entry> </base> <fields> <field name="title"> <title>Title</title> <type>inputTag</type> <searchable>Yes</searchable> <validation> <rule> <type>notEmpty</type> <err-message>Please enter a blog title</err-message> </rule> </validation> <parameters /> <tag-attributes> <attribute name="id">title</attribute> <attribute name="class">app_input</attribute> </tag-attributes> </field> <field name="category"> <title>Category</title> <type>categoryTag</type> <validation> <rule> <type>notEmpty</type> <err-message>Please select a category</err-message> </rule> </validation> <category_type>blog-cat</category_type> <parameters> <parameter name="parent_start">0</parameter> <parameter name="inputType">selectTag</parameter> <parameter name="auto_link">Yes</parameter> </parameters> <tag-attributes> <attribute name="id">category</attribute> </tag-attributes> </field> <field name="description"> <title>Description</title> <type>textareaTag</type> <searchable>Yes</searchable> <db-attribute> <attribute name="type ">text</attribute> <attribute name="length"></attribute> <attribute name="null"></attribute> <attribute name="default"></attribute> </db-attribute> <validation> <rule> <type>notEmpty</type> <err-message>Please enter post</err-message> </rule> </validation> <parameters /> <tag-attributes> <attribute name="id">description</attribute> <attribute name="class">app_input</attribute> <attribute name="rows">20</attribute> </tag-attributes> </field> <field name="status"> <title>Status</title> <type>radioTag</type> <db-attribute> <attribute name="type ">enum</attribute> <attribute name="length"></attribute> <attribute name="null"></attribute> <attribute name="default"></attribute> </db-attribute> <validation> <rule> <type>inList</type> <err-message>Please select a status</err-message> <list><val>Public</val><val>Private</val></list> </rule> </validation> <options> <option value="Public">Public</option> <option value="Private">Private</option> </options> <selected>Public</selected> <tag-attributes> <attribute name="id">status</attribute> <attribute name="class">app_input</attribute> </tag-attributes> </field> </fields> </InformationSet>

Simply add the new menu to Interface Builder and log in to the admin panel to create a new post.

<menu> <title>Blog Posts</title> <items> <item> <title>Add Post</title> <link>/information/manage/blogpost/add</link> </item> <item> <title>Manage Post</title> <link>/information/manage/blogpost</link> </item> </items> <adminicon> <type /> <location /> </adminicon> </menu>

Watch video

Vision

Through the platform, Apprain is a volunteer effort to support the software business. The framework is available for free under the MIT license, and this instance involves helping the open source community and taking part in a CSR initiative.