[@Peter Nolan] thanks, any help is appreciated...
my idea is to scaffold a resources with some basic actions/views much
like on Ruby on Rails.
Take the projects resource, it will have index(list), create(new),
show, edit(update) and delete actions/views.
I have been trying (and i am a couchapp newbie:) implement these
actions with Evently, aggregating these actions/views in a so called
couchapp "widget".
I create a widget placeholder in _attachments/index.html
<div id="widget"><div>
and trigger it with
$(#widget).evently("projects", app);
In the app evently folder, i have created the 'projects' event in the
'_init' folder like this
- data.js
function(data) {
return {projects: data.rows};
};
- mustache.html
<ul>
{{#projects}}
<li>{{key}} - {{value}}</li>
{{/projects}}
</ul>
- query.json
{ view: projects }
and i can get the projects list from database.
Now i am struggling to get a link to create a new project within the
primary widget (fire up a form in a new div and maintain the current
list of projects).
Then in each item on the list i planned to install links to edit/
update each project and delete the project (working always from within
the primary widget).
When getting this first widget to work, the same logic could be done
for tasks (or other resources) in each project (maybe in a RESTful
way).
Since i am using this app to study couchDB/couchapp, i am not sure if
this way of building the app is a good one.
Once again, thanks in advance for any help.
On Oct 15, 5:32 pm, Peter Nolan <
peterwno...@gmail.com> wrote:
> I got a general question regarding best practices with couchapp and this
> email seems like a great place to ask it:
>
> regarding individual user accounts for couchapps: whats the best way to
> create/save users information such that other apps can have the same user
> but retain the saved information generated by my couchapp? because it seems
> kind of silly to have users keep generating the same account across multiple
> apps.
>
> Currently im just dumping user profiles saved in the _users database into
> documents in app design database. But i feel there should be a better way.
>
> Serpicos: your application sounds like a more amped version of taskr and i
> would love to help you in the project if you'd like.
>
> On Thu, Oct 14, 2010 at 3:32 PM, P. Douglas Reeder <
reeder...@gmail.com>wrote:
>
>
>
> > A notable limitation of CouchDB at present is that a user can either read
> > all items in a database or none. So, if users should not be able to see
> > projects they are not involved in, you'll need a database per project.
>
> > There's no need to keep work logs in a different database than projects -
> > that would limit the views you can create.
>
> > Sent from my Palm Pre
>
> > ------------------------------
> >
couchapp+u...@googlegroups.com<
couchapp%2Bunsu...@googlegroups.com>.
> >
couchapp+u...@googlegroups.com<
couchapp%2Bunsu...@googlegroups.com>