Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[software development] File exchange software

#42
So far, progress on modularizing existing code hasn't gone too badly. I've decided to go the object oriented route. I don't particularly care for using object oriented code unless there is a good reason for it, but in this case, there is a good reason. (You may call me a bad coder for not using classes for everything, but personally I don't like seeing ungodly masses of ugly class syntax first thing when I explore index.php. Classes are undoubtedly a useful tool, but they aren't necessarily the best way to approach everything. )

I will admit that I'm not particularly experienced with variable functions, variable class names, autoload, etc..., but the results will pay off nicely. So far, I've created the basis for a module system, which loads modules automatically, and have created APIs for adding notifications and menu items. Each module has its own class, which has a constructor that adds all hooks. Hooks themselves have their functionality programmed into the $modules class, which so far is pretty basic. Page handlers and action handlers are next (which will be critical if core file edits are to be avoided in adding new modules. Tongue )

I've also set up a plugin hook system that can accept arguments, and can run any function, whether inside a class or a normal function. (That was more complicated than it sounds to set up. Particularly the variable class names. ) We'll see how the plugin system works later on. Right now, I'm still pretty early on in this.

The goal is to be able to add new features to the program simply by uploading new modules, without the need to edit any core files. These new modules can add new pages, menu links, notifications, page handlers, form/action handlers, and anything else without the need to edit a single line in the core code.

Wish me luck, restructuring 5,000 lines of existing code to use hooks and modules will be a lengthy process. Tongue

EDIT: I've now begun completely rewriting the page handler, meaning pretty much everything will be broken until I'm finished. The good news is that the new page handler will have hooks enabled, allowing modules to add pages very easily. Given how messy the old, hardcoded pagehandler was, this is looking like it will be a great improvement already.

Reply


Messages In This Thread
RE: [software development] File exchange software - by lookforuu - September 20th, 2013 at 6:34 PM
RE: [software development] File exchange software - by Acko - January 29th, 2014 at 7:49 PM
RE: [software development] File exchange software - by Acko - January 31st, 2014 at 12:02 AM
RE: [software development] File exchange software - by Darth-Apple - February 4th, 2014 at 5:51 PM
RE: [software development] File exchange software - by brian51 - February 18th, 2014 at 1:20 AM



Users browsing this thread: 2 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024