Archive for April, 2007

Apr 27 2007

Own shop software online

Published by Mathias Bank. Filed under: PHP, Programming

During the last months, I have created a new shop software. I think, that was really necessary. There are many shop systems, of course, but they are really terrible to use. So I have focused to create a shop system, which

  • … completely realizes the MVC model: the data structure (database handling) is completely separated from the shop logic, which is separated from the templates and of course the behaviour (JavaScript) and the page design (CSS) is also separated.
  • … is based on modules: I want to reuse my software wherever it is possible. There are three basic modules: UserManagement, UserAddressManagement and ShopManagement.
  • … can be extended by writing new modules: The system uses an event handling structure. New modules can interact with current modules without changing current code.
  • … uses current techniques: The shop uses PHP 5 which enables a really good object oriented way to code.
  • … always checks user inputs: the system realizes a security class, which always checks user data. No database entry will be created unless the data is checked, the programmer does not need to do this manually.

I wanted a software, which is able to be customizable and which - of course - creates valid xhtml pages. The templates should be as powerful as possible to create every possible design but they also should be separated from logic to enable designers to write their own templates. So I have used basic PHP statements to realize these approaches:

Yesterday, the shop was published: Wolf-Terrararien - Shop. I had to use current page design and to import old data.

The shop is able

  • to create static links
  • to manage user accounts (incl. order management)
  • to manage user addresses
  • to interact with editland

I think, Mr. Wolf is very happy with his new shop and I’m sure, there will be interesting improvements and perhaps some new moduls.

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...
One response so far

Apr 21 2007

jQuery-Plugin - getUrlParam (version 2)

Published by Mathias Bank. Filed under: jQuery

Some time ago, I have written a small jQuery plugin to easily get GET-Variables. The plugin is used by a lot of people. But it doesn’t satisfy all possibilities, you need.

Today, I have rewritten the plugin. It is now able to:

  • Parse GET parameters of the document
  • Parse image or JavaScript links with the help of the ID

The last method helps you to clearly separate html/php and JavaScript. I need it, because my php script is generating a special value. Now, I want to use this value in JavaScript, but I don’t want to write the value to my html-page (clear unobtrusive JavaScript). So I include the JavaScript file like this:

With this plugin, it is very easy to get the value of param ajaxUrl.

Have fun! Here is the source.

[Update]
The plugin is now able to handle href attributes, too. It checks now

  • if you want a document parameter
  • or there is a src attribute
  • or there is a href attribute
  • else it returns null

1 Star2 Stars3 Stars4 Stars5 Stars
Loading ... Loading ...
66 responses so far

^