milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

A bit more about MVC.

Details
Written by: Stanko Milosev
Category: MVC
Published: 02 December 2008
Last Updated: 19 December 2009
Hits: 6271

It seems that phpeveryday site does not working anymore, but I found on Joomla! site also a tutorial about MVC:

http://forum.joomla.org/viewtopic.php?f=231&t=136576
http://dev.joomla.org/component/option,com_jd-wiki/Itemid,31/id,components:hello_world_mvc1/

Also, I create two components, one where is MVC applied, and second without MVC.

Here is with MVC, and here is without.

If in our XML manifest file, give name of the component hello, for example, in root folder of component, com_hello, for example, must be hello.php - that's about creating components.

In MVC component which I puted for download, I also explained some of API's of Joomla! framework.

MVC

Details
Written by: Stanko Milosev
Category: MVC
Published: 25 September 2008
Last Updated: 19 December 2009
Hits: 6041

Here I will write about creating components using Model - View - Controler design pattern in Joomla! framework.

Firs of all, what is MVC?

MVC design pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. Taken from Wikipedia.

Second, how we built MVC in Joomla! framework?

I don't know :) I am still learning it, so here are some informations which I found.

I was using phpeveryday web site as a base.

If we create hello component, as it is described in phpeveryday web site, we will need following files, and folders:

com_hello - root dir
com_hellocontroller.php - here we are defining our model and view... Still I am not 100% sure what is used for, my guess is that here we will define functions and variables which we will use for view and model.
com_hellohello.php - our base - also not quite sure about it, I think it does redirect and execute a function which will be defined in task variable
com_helloviewsallview.html.php - here we are defining variables for our view
com_helloviewsall mpldefault.php - here is our view
com_hellomodelsall.php - model - here we are accessing to database, for example, and gets data as an array

You can download component, which I will use as a test bed, created by using phpeveryday, from here.

For now, this is all...

Add SyntaxHighlighter to Joomla 4

Details
Written by: Stanko Milosev
Category: Joomla
Published: 10 February 2022
Last Updated: 10 February 2022
Hits: 1660
In order to add SyntaxHighlighter to Joomla 4 in System -> Site Templates -> "Cassiopeia Details and Files" -> index.php somewhere on line 133 in head tag I have added two lines of code:
<script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script>
<link rel="stylesheet" href="syntaxhighlighter/theme.css">	  
My head block now looks like:
<head>
	<jdoc:include type="metas" />
	<jdoc:include type="styles" />
	<jdoc:include type="scripts" />
	<script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script>
	<link rel="stylesheet" href="syntaxhighlighter/theme.css">	  
</head>

Anchores

Details
Written by: Stanko Milosev
Category: Joomla
Published: 04 June 2019
Last Updated: 09 November 2021
Hits: 2919
One example of anchors in Joomla!:

When using external link

<a id="flights" href="http://milosev.com/2015-01-23-20-08-55/adventures-planning?id=119#flights">Flights:</a>
POI: id="flights"

When using internal link:

<a href="#flights">Flights:</a>
Where anchor looks like:
<div id="flights">Flights:</div>
  1. Google maps
  2. Add jQuery in Joomla 3.x article
  3. com_mailto and spam.
  4. NewsFeed in reverse order

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 87 of 168

  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91