My bias comes from having worked in Rails for so long. There is no perfect way. 
Frankly, after reading the discussion with you and Mike, I can see why 
organizing by page would be better in some situations.



On Mar 26, 2015, at 11:24 AM, Colin Yates <[email protected]> wrote:

> Ah, the good old 'package by component or technology' debate... I tend
> to fall on the component side, simply because I think it scales better
> and is how I think of the app, but I can see the merits of both sides.
> 
> On 26 March 2015 at 15:19, Marc Fawzi <[email protected]> wrote:
>> Jamie,
>> 
>> That makes sense unless you build out your site based on micro services
>> (which coordinate among themselves) and then have "micro apps" on the front
>> end (each consisting of 1-4 pages and mapped to individual features of your
>> app) that don't need to share state/data. In that case, you'd want to
>> arrange under app name and each would have its own repo.
>> 
>> But in that case, I think re-frame might be too much abstraction for the
>> amount of code you're having to deal with (less than 400 lines per app) ...
>> At some small scale the abstraction becomes noise.
>> 
>> On Thu, Mar 26, 2015 at 8:00 AM, Jamie Orchard-Hays <[email protected]>
>> wrote:
>>> 
>>> Coming from the Rails world as I do, I'd invert that:
>>> 
>>> handlers/page01.cljs
>>> subscriptions/page01.cljs
>>> views/page01.cljs
>>> 
>>> etc.
>>> 
>>> Jamie
>>> 
>>> On Mar 26, 2015, at 3:32 AM, Colin Yates <[email protected]> wrote:
>>> 
>>>> How would you structure this for an SPA with multiple top-level
>>>> 'pages'? I am thinking:
>>>> 
>>>> - common (the usual bootstrapping crud)
>>>> - page1/[handlers,subs,views etc.]
>>>> - page2/[handlers,subs,views etc.]
>>>> ...
>>>> 
>>>> The central db would be in common/state.clj which each page, during
>>>> 'bootstrap' would update with a default state and schema.
>>>> 
>>>> Thoughts?
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On 26 March 2015 at 01:52, Mike Thompson <[email protected]>
>>>> wrote:
>>>>> On Thursday, March 26, 2015 at 1:07:56 AM UTC+11, Colin Yates wrote:
>>>>>> Hi all,
>>>>>> 
>>>>>> What is the recommended approach? Cloning the example project, the
>>>>>> re-frame-template (which is still using re-frame 0.1.8) or sticking it
>>>>>> together by hand?
>>>>>> 
>>>>>> Thanks!
>>>>> 
>>>>> 
>>>>> We do have the mandatory lein template in the wings.  Will be released
>>>>> very shortly, I hope.
>>>>> 
>>>>> In the meantime, look at the structure of the todomvc example.
>>>>> https://github.com/Day8/re-frame/tree/master/examples/todomvc
>>>>> 
>>>>> 
>>>>> --
>>>>> Mike
>>>>> 
>>>>> --
>>>>> Note that posts from new members are moderated - please be patient with
>>>>> your first post.
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "ClojureScript" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/clojurescript.
>>>> 
>>>> --
>>>> Note that posts from new members are moderated - please be patient with
>>>> your first post.
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "ClojureScript" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/clojurescript.
>>> 
>>> --
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "ClojureScript" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/clojurescript.
>> 
>> 
>> --
>> Note that posts from new members are moderated - please be patient with your
>> first post.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ClojureScript" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/clojurescript.
> 
> -- 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to