Introducing: Universe News Indexer (UNI) (read news without ads)

Hey,

Almost every day i read the news on:
UniverseToday.com
and
Tweakers.net

but both have recently (few months ago) added some more banners. Enough banners to make the reading of news a pain in the ass so i wanted to make a script that downloads there news, puts it in a clean layout and shows it to me. Universe News Indexer is exactly that. Those sites only have there selves to thank for my “news ripper”.. if they didn’t added those annoying flash and gif banners and just would have been happy with Google ads than i wouldn’t have found the need to make this script. But i do realize that my script might not be completely legal because it’s just ripping the news and displaying it somewhere else. O well.. i didn’t remove the credits.

UNI provides the news of those sites without any ads at all.. i just strip them all out.
UNI currently only has those 2 sites but i want to add the ability to add more sites.. you can read all the whiches for UNI 1.0 here:
UNI Beta 1.0 wishes

Now the site itself:
UNI.Mageprojects.com

Have fun reading the news and please be kind enough to provide me with feedback for the site and mail me the sites you would like to see indexed. Send the suggestions to: markg85@gmail.com

That’s it for now. No MageDB news (except that the layout of UNI is about the same as MageDB only than in div’s only. NO TABLES (which magedb still has))
Till next blog,
Mark.

MageDB Admin Panel W.I.P. Image

Hey,

I just wanted to show a Admin Panel image so here it is: (right click -> view image)

MageDB Administration Panel

now the links in the right part are way out of alignment and not even correct anymore. The part that is oke is the left menu and the layout around it. The left menu also has a nice ajax animation in the left menu but you can’t see that at this moment ^_^.

Slight hint: alpha 1 (0.1.0) is coming closer. and i might put online a perview on: magedb.mageprojects.com within a few days.

Till next post,
Mark

ADOdb Lite has left the building; MageDatabaseWrapper entered

Hey,

Like i said a few days ago.. i’m not happy with the memory and file usage of ADOdb Lite and making 2 simple modules added 80kB to the memory usage!! so now i’ve just made my own database wrapper which at this moment only supports MySQL (no i or SQlite). The wrapper will (of cause) be extended with a MySQLi extension and likely a SQlite extension as well. PostgreSQL is also possible.

MageDatabaseWrapper is a new script and it uses some php tricks that i hardly understand (just never used them before) so it might be revised completely is a future MageDB version.. perhaps even before the first final gets released.

Now the interesting results.
With ADOdb Lite the memory usage was around the 600kB (main site on a database with about 8000 files).
Wite MageDatabaseWrapper the memory usage is: 440kB (also the main site with the 8000 files).
That is a big difference!

Now Template Lite is still bothering me as well so i gotta take a look at that one now.

Update: The MySQLi plugin is now completed as well and seems to be working fine.

That’s it for now.
Mark

Posted in MageDB. 3 Comments »

Progress update + Module system

Hey,

A while ago i’ve written here that it was unlikely that the module system would get into MageDB because i simply didn’t know how to write it. After days of testing and help of some people (someone even wrote a sample module system) i finally have the ability to make such systems. Now that this isn’t a issue anymore some parts of MageDB will make a good profit out of it. So in case you didn’t got it yet. There is gonna be a module system in MageDB and it’s gonna be on the database system and perhaps some other parts as well.

I’ve also experimented a little with a flexible caching system (MageFlexibleCache : mageflexiblecache.mageprojects.com) and nearly completed it in just a few hours. it does need some fine tuning. this is how it’s currently working:

$cache = new MageFlexibleCache;
if ($cache->LoadCache(“MyExpensiveEcho”))
{
echo $cache->loadedcache;
}
else
{
$cache->Start(“MyExpensiveEcho”);

for ($i = 1; $i <= 10; $i++)
{
echo “The time is: ” . time() . “\n”;
}

$cache->End();
}

And this is working. It now first checks if a certain part is in a cache and if it is than it will load the cache, if it aint than it will just run the php code and put it in a .cache file so it will load it from the cache the next time. All that is need to be done in this caching is making it smart.. but in order to do that i need to make the code around the caching smart and leave the cache about the same. Things like this could be in MageDB 1.0.0 otherwise it’s gonna be somewhere in the MageDB 1.x.0 releases. This caching will make MageDB alot faster and way more query friendly than my current MageDB or any other file database script (paFileDB ;) ).

And than there is the ADOdb Lite library. lets put it simple. it’s still to big for my taste and uses to much memory. i’m gonna make my own db wrapper with the module system that i just made. Initially i will make modules for MySQL and MySQLi so (hint hint) this will most likely mean that MageDB is gonna work on MySQL and MySQLi and i hope to make SQLite and PostgreSQL modules in later versions. I think i might release this db wrapper as well as: MageDatabaseWrapper(?) (magedatabasewrapper.mageprojects.com).

Than there is the (still) bulky Template Lite template engine. i think that it’s also to big for what i want to do with it. going the way of phpBB would be fine for me + i need it to be able to exclude certain parts in the templates (like i posted 1 or 2 posts ago).. i don’t really know if i’m gonna:
1. Modify Template Lite to my needs
2. Leave it the way it is.. (means no smart caching for MageDB (yet))
3. Drop Template Lite and make my own of this as well and perhaps call it: “MageTemplateEngine” (and : magetemplateengine.mageprojects.com)

Than last but not least.. the progress on MageDB itself at this moment.
I did do a few things but it are only layout changes. not any php coding. The public part is getting close to be done. The admin part and personal control panel are still not done (admin panel needs rewrite, personal control panel needs some bindings and more options) once the admin cp, the personal cp and the public part are either done or good enough to use than MageDB 0.1.0 Alpha will be released to the public. This release won’t have all the ajax goodies i promised earlier nor will it have all the features but than again it isn’t final as well.

I expect to release 5 alphas, 3 beta, 1 rc and 1 final

// Everything can change here
MageDB 0.1.0 = Alpha 1
MageDB 0.2.0 = Alpha 2
MageDB 0.3.0 = Alpha 3
MageDB 0.4.0 = Alpha 4
MageDB 0.5.0 = Alpha 5

// A lot can change but no major changes (ex: other them or new name etc..)
MageDB 0.6.0 = Beta 1
MageDB 0.7.0 = Beta 2
MageDB 0.8.0 = Beta 3

// This release will only feature bug fixes
MageDB 0.9.0 = RC 1

// If No bugs are found in RC 1 than this is mainly RC 1 with some cleaned code. otherwise the bugs from RC 1 are fixed in here and be released as Final.
MageDB 1.0.0 = Final version 1.0.0

That’s is for this (_long_) blog post.
Till next post.

“bright” new idea for MageDB to make it extremely fast

Hey,

I was just looking through the Zend Framework and found that very interesting.
They do things in there that could be very useful for MageDB. The thing i’m interested in mostly (for now) is the zend caching feature. IT could help me alot to avoid using queries at all. Oke.. that needs some clarifycation right?

With the current MageDB build i’m not caching anything at all and thus making magedb a relative heavy script (it needs to do big php loops all the time and grab big database query’s) with the template system that i currently use (Template Lite) i can use caching options but not how i want it. with template lite you can: “set the caching to true and set a timeout” that’s not handy to use for a file database script because it might change a lot. With Zend Cache i can start the cache on any part of the page i want, look if a existing cache file is there of that part and load it. that’s way more flexible than Template Lite and it’s still small (137.0 KB for the Zend Cache framework). So now i have the idea to cache everything on MageDB and making the cache somewhat “intelligent” and by that i mean that it’s still checking for any database changes and if it finds that than it will rebuild the page and put it in the cache. This all seems like a good idea to me and i might use it. But sadly this has a big disadvantage as well. the caching stuff might be way more flexible than Template Lite his caching capabilities but that’s about it. it doesn’t support templates at all… so either Template Lite is gonna be deleted from MageDB and i start using (and make a small own template system) or i expand template lite a bit to have better caching capabilities…. both options are tempting to me. and both options will make MageDB alot faster because it doesn’t have to run heavy query’s or heavy php loops all the time..

In the end i might even choose to keep it the way it is and make this in a MageDB 1.x.0 release or even 2.0.0
If you have any thoughts about it (if anyone is even reading this) please tell me.

Update:
I just found out that Zend Framework requires PHP 5. now that isn’t a problem for me but it is for the majority of the (future) web administrators because the majority of the hosts are still using PHP 4.4.x and not PHP 5.x.x and i want to make MageDB 1.x.x available for PHP 4.4.x so therefore i cannot use Zend in the first MageDB release series. Perhaps CakePHP? o well.. you will see it when it’s released.

Update 2:
Oke new info on the caching part.
CakePHP does seem to be able to do what i want with caching although it doesn’t have a clear manual about that part.. so i might give CakePHP a try on the caching part but i might as well write a caching system myself… here is a sample of something that i need to be able to do with the caching system:

<cache start>
code…
[...]
<cache interrupt>
[...]
code that doesn’t need to be cached
should be here…
[...]
<cache resume>
[...]
other code that’s cached
[...]
<cache interrupt>
[...]
o wait.. we need to get this out of the cache as well
[...]
<cache resume>
[...]
the last parts of the page
[...]
<cache end>

Something like that could be very likely needed in MageDB and Template Lite isn’t offering that. Smarty is offering it partly and Zend Engine is offering is… CakePHP seems to offer it partly.

Mark.

Tiny MageDB update

Hey,

I’ve just finished the navbar.class.php file that takes care of the navigation that will be always visible in MageDB.
This navbar class was hard to make while the code isn’t long at all.. just hard to make. The navbar is finished and fully implemanted in the public part of MageDB (not in the admin panel, yet)

Another thing that i’ve just finished is the “filecount class” this might also seems like a stupid little class but is quite useful. I assume you would like to see how many files there are in a certain category… this class takes care of it and it counts recursive (meaning that it’s also counting all the sub categories).

The above additions make the public MageDB part progress at about 70% i think. Those 2 where the most difficult to make.

Next 1. : SEO friendly urls
Next 2. : adding the admin panel (doesn’t mean that it’s completed).

And i’m gonna experiment some with Modules. will probably be very and won’t be in MageDB 1.0.0 but it’s the main new thing for MageDB 2.0.0

Till next blog,

Mark