• I haven't finished with the notifications stuff, far from it yet, however, I been thinking on changing the way Breeze works.

    Currently Breeze is nothing more than a bunch of classes who are lightly connected, each class calls the main class when its needed:

    Code: [Select]
    $this->_settings = Breeze::settings();
    $this->_query = Breeze::query();
    $this->_tools = Breeze:tools();
    $this->_text = Breeze:text();

    That's kinda ugly, it will be better if every class extends the main Breeze class, that way I can freely use $this->text()->getText('string'); automatically and would not have to call every loose class out there.

    I will give it a chance, now that I finally figure it out how to work with branches on git :P
  • Next thing to do?  Logs. And perhaps a little bit of UI.

    In reality, logs would be pretty much the same as the notifications, makes sense to re-use that table,  I foresee a lot of sprintf and member data usage   :-\
  • Oh, I also need to properly define the CRUD for the notifications as well as the UI which is plain ugly at the moment!
  • meh... I soooooo not want to do the notification stuff for mentions, comments, status, new topics and replies lol  is just too much redundant code... a  lot of building strings with sprintf and a lot of arrays...   meh... I gotta do this one a day where I'm in a very very good mood...
  • The mention stuff turned out to be much more difficult than I ever imagined :(  and I haven't even started to apply the notification system to it...
  • Well, I end up with this solution:

    The mention stuff will of course be done just one time, that class (BreezeMention) will not only handle the notifications but also will pre-format the message so the parse class can take that pre-formated string and convert it to an actual link with no queries involved, the work flow is as follows:

    Mention takes the raw string:  {Suki} 
    strips down the name: Suki
    Make a query to get the real name, display name and ID
    Send the notification
    convert {Suki} into {1,Suki,Suki}  which is ID, display name, real name
    returns the string to be saved to the database

    The parse class takes the formated string: {1,Suki,Suki} and converts it to a link: @Suki using the data available.

    So far it works pretty well and one good thing about doing a query 1 time only is that multiple tags gets automatically removed by the query itself since the query returns an array with the ID as key.

    I need to put a limit on the amount of people that can be notified.
  • I haven't done much in this last week, dunno why really.

    Next September this project is turning 1 year...  1 whole year for something that isn't really that big.

    Is still far from finished, in fact, I can say I'm not even half the way, I still haven't done the Source code, the UI stuff is yet another beast and I haven't even touch it.

    I posted a WIP at simplemachines.org and I didn't get the response I was expecting to be honest, the people that did got interested wants a Facebook clone, which is an impossible thing to do for a single person.

    I dunno, perhaps this will be a never ending project without a proper release.
  • Suki | Re: Thinking, code monkey and software architecture
    September 18, 2012, 01:01:17 PM
    Been toying with infinite scroll, found some nice jquery plugins for it.

    Again, I have lots of ideas but the source code must be ready and robust before I can play with the UI :(
  • Suki | Re: Thinking, code monkey and software architecture
    September 25, 2012, 01:00:04 PM
    Yet another semi-update on this.

    I was thinking on building a whole plugin section to easily add per user options for Breeze, however, I still need to find a good way to do it and even if I found it, I highly doubt it since a plugin generic example is just not possible, I still ain't that comfortable with some OOP properties.

    Just for that, I decided to just ditch all of that and just use plain per user SMF options using the themes table, its pretty easy to add them at will, just need to modify m form class a little bit and it also cuts the need to load those options separately or even the need for an extra column in the members table like I have now.
  • Suki | Re: Thinking, code monkey and software architecture
    September 28, 2012, 04:52:04 PM
    mmm, got a few hours on a Friday afternoon, gotta push some code to Breeze. Then party all night  8)

    I didn't even know SMF have its own form generator code LOL after a few looks at the files I was able to ditch all my custom and ugly code for a much better and cleaner solution.

    I was working just fine, then I start to add more options and then it suddenly didn't want to save my options anymore  :o I must have changed something while adding more options, dunno.
  • OK, after a lot of time spend on debuggin I realize SMF's own generator form isn't designed to be used by external mods.

    But not everything is lose, I can still use the save system and I can still use hooks for it, I will need to do a lot of work and resuscitate my own form generator class but I should be able to add more per user options in the future relatively easy, perhaps even by implementing my own plugin system.
  • OK, I've been working on this on my free time, this makes it much more difficult since I gotta remember what exactly I was doing last time :(  sometimes I left something unfinished and remains that way until I stumble up it weeks or even months later...
  • OK, Breeze now has 8178 lines of code, considering empty lines as well so the "real" code lines should be around 4000...

    4000 lines of code and I'm still half way :P
  • Screw the DB layer...  its doing more harm than good, back to good old $smcFunc :P
  • OK, been doing lots of changes on early process, to my surprise nothing was broken or at least the things I tested wasn't broken by this changes.

    I removed the DB class calls and convert the queries back to normal SMF ones, much easier to debug things if the error points out the the exact query rather than the DB class :P

    I had to write an small quickQuery()  method on the Query class, this was just for cosmetic purposes, that is, to avoid having queries on the controller and instead put them on the model.  I still need to move a lot of things from the controller to the view and form the model to the controller.