After finishing different tutorial-apps, reading a lot and slowly falling in love with Meteor I’ve decided to build my first own app. From idea to concept to final usable product. Something I can use in my day to day job as a frontend dev / webdesigner.
For this I would love to have some general advice.
(Questions at the bottom)
The Idea
At work I mainly do webdesigns/concepts for different projects.
So in the app I need to create:
a) different “workspaces” (or “workstreams”) for different projects,
b) add tasks,
c) add notes & feedback,
d) have some kind of timeline at the end of the project (to see what happened in general)
So basically:
A super simple version of Slack. Plus tasks.
The concept
I’ve made this concept for desktop and mobile, which should make things more clear: http://tinyurl.com/ot4hr9w
(Created with Balsamiq Mockups - great tool, highly recommend it)
Functionality:
a) You enter new tasks or notes (at the bottom), which are then displayed on a timeline.
b) With the dropdown (at the top) you can chose: Complete Stream, Notes only, Tasks only, to filter the
stream.
Apart from that:
Just simple user accounts, no roles, no permissions, no backend, or sharing of workspaces between users.
The Questions
I’m not sure exactely where to best start. Build the layout in html & css first and then apply the functionality? Implement the workspaces next? Or start with building a simple task-list first and work from there? Does it even matter? How would you approach such a thing?
Are there any pitfalls you can see? Something thats terribly tricky and I should watch out for?
A bit vague, I know: How long would a professional Meteor developer (you?) need to build this?
Closing thoughts
Yup, thats it.
Any thoughts and or advice is highly appreciated. I’m eager to start and am totally happy to have joined this community. Looking forward to work with you all.
“A journey of a thousand miles begins with a single step.” - Laozi
But in all seriousness I think the idea of building an entire app from nothing can be a bit daunting. Since you said you are a frontend engineer I would start with building the frontend/ui because that is presumably what you are the most comfortable with. After you have the UI up and static you can start applying the most basic functionality to it which for the most part will be just more frontend javascript. Eventually there will be a point when you can’t do anything more without adding some server side functionality. You can do this part incrementally as you need it (I would put together a basic idea of how you want your collections to be defined as well as server side file structure to help maintain a clean code base first but that’s just me). Then if you continue to build it I think you will realize that most things aren’t as hard as they seem at first.
tl;dr: build what you’re comfortable with first then fill in whats left.
Just my opinion though, everyone has different methods.
To address your first question about how to get started :
Personally I start at the Schema = Data Model for the app. I make a list of Collections and their fields and field types. Simple Schema package is helpful for this process but is not necessary. In fact you can just do it on paper, very similar to mocking up a UI, it’s just a draft of your database.
Most likely it’s going to change, so I do my best and then move on to coding the UI, then I’ll realize I need additional fields on a Collection or perhaps two separate Collections should really be a single Collection, etc. So it becomes an iterative process.
I find that a well suited database design makes the UI coding really fast and intuitive, so if at a certain point it becomes extremely challenging to code some feature I’ll reconsider the Schema and often times manipulate it to better serve the needs of the application.
You’ve done a good job of clearly describing your needs here. So if it were me I would start by thinking how each of these items would fit into the Database and relate to each other, and then think about what kinds of server Methods will be needed to interact with the data.
Go to the official MongoDB site and do a lot of reading on different data models (one-to-many, many-to-many, etc). MongoDB is so different from traditional relational databases. If you come from a relDB past, you’ll have to rethink how you want to structure your data, assuming you’ll be using MongoDB.
I can recommend http://asana.com as a product that already does what you want to build. Maybe helpful as inspiration or even a good alternative until you have built your own tool
I’m not sure exactely where to best start. Build the layout in html & css first and then apply the functionality? Implement the workspaces next? Or start with building a simple task-list first and work from there? Does it even matter? How would you approach such a thing?
You can start with a minimum viable product. Build the essential features first and enhance them with time. I think starting with UI design first is a good idea because it’s visual and you get a better idea what is needed I think. Wireframes are your friend Or copy an existing tool like Asana
Are there any pitfalls you can see? Something thats terribly tricky and I should watch out for?
My oracle doesn’t show anything, sorry
A bit vague, I know: How long would a professional Meteor developer (you?) need to build this?
Depends on the feature scope (the details). I think it doesn’t really matter. Take your time. You can take Asana as a fully executed product for this idea It has a lot of nice detail features that make it a great product. And they still work on it (since 2008).
thanks for your encouraging repliesand the super friendly welcome!
Update # 1
Following your advice I’ve decided to walk this path:
Build the static version first
Learn some more about MongoDB data models
(thanks captsaltyjack, the MongoDB Docs already made a lot of things more clrea to me)
Draw out the data-model
(this still feels new to me, but at the moment I’m thinking about an “embedded data model” with the lists as the main documents, and note & tasks as embedded sub-documents. <- hope what I just wrote made sense )
Implement functionality: Add new list
Implement functionality: Add tasks to a list
Implement functionality: Add notes to a list
Login and accounts-stuff
App-Status
I could find some time to work on the static version today.
Here’s the result so far: workstreams.meteor.com
I focused on the static layout for desktop and mobile + some animations first.
Obviously needs some work, but hey I’m getting somewhere
Oh, also: Only tested in Chrome.
Hey looshi,
thanks so much for your help. Collections feel kinda daunting to me still. Its this magical, complicated beast, that I’m just slowly getting to know better.
But making a mockup of the data-model is a fantastic idea. Never occured to me. Will definitely do that!!
I’ve created my workstreams-collection and added the functionality to…
2.1 add strams (via.insert())
2.2 remove streams (via .remove())
2.3 select a stream (via Session.set / Session.get)
Then I’ve spend some time on Animations in Meteor.
3.1 I could successfully implement the “fly-in” effect, when a stream is created
3.2 I could not do the same for a fly-out effect on remove
Overall Animations in Meteor still feel strange and complicated to me.
Next thing would be the ability to add tasks to a specific stream.
At the moment I have no clue how to insert embedded sub-documents into an existing document. I’ll see what I can find on the topic. But if anyone can point me in the right direction, I’ll happily go there.
Don’t do embedded documents because Meteor’s reactivity model works best with top level documents.
Therefore, create separate collections for your notes and tasks, and reference the workstream’s id in them.
Also, don’t use object id’s because most meteor packages (especially the core accounts package) assumes string id’s therefore you’ll sooner or later have some string id’s in your database. Because of that, you’ll want to keep it consistent, so use string id’s with your collections as well.
Now you’ll begin scratching your head about how to join or reference the related notes and tasks with their parent workstreams.
There are multiple ways of doing this and reading through https://www.discovermeteor.com/blog/reactive-joins-in-meteor/ and in fact, read through the complete blog at one go without thinking too much about it. It may whirl your head, but will leave some concepts imprinted in your memory.
I’d also suggest getting a copy of the discover meteor book which is the definitive guide for meteor beginners.
After that, you might want to check out these packages from atmosphere:
aldeed:collection2
dburles:collection-helpers
matb33:collection-hooks
reywood:publish-composite
tmeasday:publish-counts
for all things collections and publishing for them.
But meteor does have to make some decisions in order to provide the same database api on both client and server and for providing magical reactivity. A major choice is tracking top level documents to compute diffs.
That’s why, embedding documents is not generally advised where the embedded content is to be updated reactively which, a notes/tasks context should be.
Where did you read/learn about this? Or did you run tests yourself? So you’re saying that a document like the one below is not good in Meteor? Because reactivity has to work harder to look for updates?
It will count as a changed event on the subscription, therefore the whole document will cause a recomputation. There are times dom diffing can be clever enough to compute the actual difference, there are times it can’t. But the subscription has to compare the complete document before/after in any case. This is a performance bottleneck as well as unnecessary recomputations.
I only show the input-field when a workstream is selected. I do so by using a Session.
But when I have selected a stream and then just delete every stream, the session is still there.
So the input field still shows. My guess is: I have to somehow “kill” the session in this case?