On Tue, Dec 16, 2014 at 1:39 PM, pyramidX <[email protected]> wrote: > > What is the difference between component vs application in the way you > define it just wondering? > > In my case, I was saying that I ask myself these two questions:
"If I were trying to white-label this application, or extend and repurpose it, would I want to include this part?" "If I am going to invoke this application from the command line, or as a daemon, what things are very deployment specific?" I try to keep components isolated, and I put very little in the main function. An example might help. In my main function is code that inspects os.environ and overrides settings. That makes it easy to deploy copies of my application without writing .ini files all the time. But I wouldn't want to surprise someone who just wants to re-use my views or business logic by having that configuration overridden by environment variables. I like to keep those environment variables documented and together in one place, rather than scattered throughout the code base. So, the question is, "is this part of something isolated and re-usable" or "is this something very top level, specific to this application as I might deploy it". Hopefully, maybe, that helps a little bit? I think it isn't likely to matter that much. When it does, you'll be able to refactor that quite easily. I think it's good that you have the habit of thinking about and understanding these nuances, but I wouldn't let it distract you from getting things written. :-D -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss. For more options, visit https://groups.google.com/d/optout.
