ushahidi / platform

Ushahidi Platform API version 3+
http://ushahidi.com
Other
680 stars 506 forks source link

Frontend Architecture #33

Closed rjmackay closed 11 years ago

rjmackay commented 11 years ago

This is a big chunk of discovery work to figure out what libraries, etc we're going to use in building the frontend. A few questions / items to address:

rjmackay commented 11 years ago

ping @dkobia thoughts on what else this needs to cover?

rjmackay commented 11 years ago

My thoughts on how this works:

Deliverables:

Extra considerations (maybe done in later features):

dkobia commented 11 years ago

Throwing a couple more links into the fray:

As for JS Frameworks, there are few options:

Also:

For Events/Hooks (re:plugins)

sethburtonhall commented 11 years ago

I'll throw a few more things in the mix...

and you have a kick as web app!!!

sethburtonhall commented 11 years ago

Once I talk with Robbie on Monday and grill him with questions :) I will have a better grasp on the flow and architecture and be able to move forward with more confidence.

I am totally stoked to be developing this platform and solving problems with this team .

rjmackay commented 11 years ago

So I lost a day or 2 digging into JS frameworks.. some thoughts from my research:

Mustache is basically handlebars with slightly less features. I'd be happy with either but can't find much support for Handlebars in PHP+Kohana. I've started playing round with https://github.com/zombor/KOstache/ for mustache templates in PHP.

"Also maybe we can do javascript based bandwidth detection and render a lighter theme?" -> would be awesome for a 3.1/3.2 feature.. along with offline web app support!

Events in Ushahidi 2.x always felt like a hack to me.. but might need it or an equivalent.

I've started getting a SCSS/Compass build process set up using kohana-media and minion-tasks-media https://github.com/Zeelot/minion-tasks-media/ There are a couple of contraints here:

rjmackay commented 11 years ago

@middle8media I also played with http://semantic.gs/ grid system. But I'm happy to let you drive the choice on grid systems.. whatever works for you.

Jekyll is awesome but not really an option since I'm limiting our stack to PHP since our deployers are often on crappy hosts etc. That said I'd love to use Jekyll on a custom project to build out a story telling site around Ushahidi core.

sethburtonhall commented 11 years ago

@rjmackay Yes, http://semantic.gs/ is great! I have used Susy which is similar. Keeping the grid out of the markup is the best. I saw we go this way.

Yeah, Jekyll is sweet, but not for this project. Maybe we can use it somewhere else.

sethburtonhall commented 11 years ago

So today I found a really cool repo that generates a dynamic pattern library/style guide using a simple php script and the project's existing CSS codebase

Here is the flow

To update all we have to do is style the SASS and compile to CSS as usual then add any new html snippets. Very cool and easy to customize, maintain and scale. This is the best solution I have found from all my research and hope to integrate it into the 3.0 Front-End Architecture.

https://github.com/adactio/Pattern-Primer

We just need to figure out how to maintain exclusive control and display to both Ushahidi team and the public. I have a few ideas that revolve around hosting on Github Pages or service hooks.

Any disadvantages?

others???

sethburtonhall commented 11 years ago

of course this can and will be styled differently and customized to our needs. But the dynamic generation and scalability is the bomb.

rjmackay commented 11 years ago

RE: pattern primer, my main concern is that its a PHP script outside of Kohana, which we don't really want. However given all its doing is generating a quick listing of patterns, I think we could rewrite that as a kohana module really easily. That way deployers could easily enable disable the patterns list too.

sethburtonhall commented 11 years ago

Example Screenshot:

http://cl.ly/PJKq

sethburtonhall commented 11 years ago

@rjmackay that is interesting. I am not familiar with Kohana, but I trust your judgement.

It would be easy for internal dev team to keep updated, but would it be too much to ask for our deployers.

I still need to wrap my head around what our users want and how we envision our patterns library.

sethburtonhall commented 11 years ago

This is another great example and resource from Brad Frost

http://patternlab.bradfrostweb.com/

I am looking into how he developed this

rjmackay commented 11 years ago

@middle8media are you using SASS with indented format or CSS style format? ie.

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
  border-color: $blue;
  color:
    darken($blue, 9%);
}

.border {
  padding: $margin / 2;
  margin: $margin / 2;
  border-color: $blue;
}

vs

$blue: #3bbfce
$margin: 16px

.content-navigation
  border-color: $blue
  color: darken($blue, 9%)

.border
  padding: $margin / 2
  margin: $margin / 2
  border-color: $blue
sethburtonhall commented 11 years ago

I am using SASS with CSS style format

$blue: #3bbfce;
$margin: 16px;

.content-navigation {
  border-color: $blue;
  color:
    darken($blue, 9%);
}

.border {
  padding: $margin / 2;
  margin: $margin / 2;
  border-color: $blue;
}
sethburtonhall commented 11 years ago

What are your thoughts on RequireJS in terms of this project?

I would like to use it to keep my JS/jQuery modular, especially as the app scales, but I don't have tons of experience with it and I am wondering how it would effect things on your side.

Let me know your thoughts on working it in.

sethburtonhall commented 11 years ago

Two informative RequireJS links

http://devblog.wesmcclure.com/posts/why-requirejs

http://www.sitepoint.com/understanding-requirejs-for-effective-javascript-module-loading/

rjmackay commented 11 years ago

I haven't had time to really digg into requirejs .. it is being used for Crowdmap. But really.. use whatever gets you up and running fastest. If something doesn't fit we can work that out later.

sethburtonhall commented 11 years ago

Awesome, I think it will be good for 3.0. I am on it.