This app was mentioned in 1 comment, with an average of 2.00 upvotes
> I'm thinking of finishing developing the basis to a social network using my normal Flask workflow and TeamTreehouse.
That's a good idea. Finishing your project is great, too many devs just discard projects when they start out (me included!). Here's what I recommend your project roadmap looks like:
getFriends()
returning an HTML page of my friends, it returns JSON . Then you'd have a function showFriendsPage()
which would call getFriends()
and then pass it to a view. I'll explain this in more detail in a sec.api.mysite.com/<whatever>
getFriends()
directly and entirely ignore showFriendsPage()
, because you'll be re-creating the layout on mobile.Step 2 is a great learning experience, as refactoring code is something everyone has to do. Also this is very problem is something I've had to due a few times in my job, so getting experience at it is good. The really useful thing is having access to all your data functions that's separate from how the data is presented. Right now, your data is always presented in the middle of some HTML. If you want to include that data in the middle of another page you have to re-create the data retrieval. This way, data is separate from presentation.
>Would you consider this a good learning path for someone aspiring to be a cross-platform full-stack developer?
Yes. I'm a self-taught full-stack developer who now has a few government contracts for mobile apps (both Cordova and native). This project will have you learning the fundamentals. Being able to create and consume a JSON API is of crucial importance.
Another thing to keep in mind is read up on RESTful APIs. People love to debate exactly what REST means, but the long and short of it is it's a way of organizing your API's URL endpoints so that they reflect the actions on the objects you want to modify. Importantly, RESTful implementations care about what type of HTTP request you send (GET, POST, DELETE, etc). So sending an HTTP GET request to api.mysite.com/users
would get a list of all the users. Sending an HTTP POST to api.mysite.com/users
would create a new user (or alternatively, to api.mysite.com/users/create
- either are fine, just be consistent). Sending a GET request to api.mysite.com/users/<userid>/friends
would get all the friends for a given user.
I know all this URL stuff probably sounds boring an unimportant, but it's not. Having well organized URL endpoints is probably the most important thing in creating a good JSON API.
>My current plan is to either develop web apps and present them to some wealthy friends itching to start an app development firm. OR I may continue learning more Javascript so I can develop cross-platform experiences myself.
Both those ideas sound good. I'd personally recommend pitching them to friends - if you can get these guys paying you to learn and sharpen your skills that's great. After you get some experience you can always start your own ideas.
I know I said it before, but I do recommend using Ionic. You'll create much more visually gripping apps using Ionic out-of-the-box than Cordova. Just scroll through the Ionic components page, and look how easy it is to have native looking elements. With plain Cordova you get a blank HTML page and are told to get crackin'. The Ionic docs are really good and should help a lot, but you will benefit if you learn some AngularJS beforehand. But if you dove right into Ionic you'd get out on the other side fine, it'd just be a tad more painful.
>For someone who'd rather develop some minimum viable products and prototypes for investors, is the trouble of learning Javascript frameworks to develop dynamic web and mobile apps using Cordova worth it?
Oh yes. Cordova/Ionic absolutely excel in MVPs. That's both their strength and their weakness. If you're not aware, Cordova has worse performance than a native app especially when you start to deal with things like games (animations, reflex-based stuff, lots of elements on the page, etc). Building a native app will have better performance, but it'll also take you a lot more time. So that's the tradeoff: Cordova is quicker to build and you get cross-platform basically for free, native is slower to build but more performant.
I went from never having used Ionic, to building a ~$10k app in 1.5 months in it. This is a full app that's on the Play Store. I used Angular for a few weeks over a year ago, but besides that had to re-learn a bunch.
>I mean, if a social networking app of mine did ever gain traction, I'd probably need an investment to hire a small team of developers to maintain it.. right?
Realistically if your app really took off you'd have to re-write it to be native. And that's fine. It's still probably a better decision for you to write a hybrid app and see if there's any traction. Hybrid apps can still be profitable and successes, but on the other hand there's a reason why Twitter/Facebook/etc all use native apps.
By the way, I love mentoring people about this sort of stuff if you haven't picked that up. While I haven't used Flask in over a year and can't help much on the nitty-gritty, if you ever have any questions feel free to shoot me a PM. Even if you just wanna shoot the shit about tech jobs and stuff. I'm self taught, have been in the industry for +2.5 years, and always pay close attention to career/industry trends. Good luck on the social network!