I think the main benefit of REST is that it's straightforward. Most developers are familiar with it. It's relatively easy to build an API, and for developers to build on top of.
The downside, compared to GraphQL, is that for certain use cases you might end up needing a ton of API calls what could be done with just one in GraphQL.
Example: let's say we want to fetch all products of a user and the associated pending todos. With REST we might make a call to get all products of a user, and then for each product make a separate call to get their pending todos. The more products, the more API calls we're making. Now imagine todos had comments and we wanted to fetch those too. That would again exponentially increase the number of API calls needed.
Now we could create the API such that fetching a product always returns its todos as well, but that's overkill in many other use cases. Okay you think, what if we make it configurable? Maybe we can add a GET parameter to the URL to tell the API whether to include the nested resources such as todos/comments/etc.
Well, that's basically what GraphQL is. With GraphQL the developer can just make one request and say "I want all of Franz' products, for each product I want its completed todos, and of those todos I want the comments too". And you can even specify which attributes you want. Maybe you only need the product name and description, and not all the other stuff. GraphQL lets you specify all that in one API call.
GraphQL's flexibility comes with the cost of complexity. It's more complex to build an API, and for simple use cases it's more complex to use the API. So there's no clear winner. It really depends on how you expect developers to use your API.
Disclaimer: I have limited experience building APIs, especially GraphQL APIs. Even though that's what I decided to use for WIP.
You use GraphQL for WIP Marc?
Yep. wip.chat/api for more info.
I'm not 100% sure yet it was the right decision. Like I said, it more flexible than REST, but not as straight forward for developers unfamiliar with it. This might hold back more people from creating simple integrations.
Very cool. But does the Rails app (frontend) driving WIP use the GraphQL API or direct db calls in controllers?
It depends on the market, but average CPM (Cost Per Mille) is roughly around $3. So that means for every 1,000 pageviews you can expect about $3 in revenue.
Let's assume you have about 3 pageviews per visitor (look at your analytics to see the real number). At 5-10k visitors that means around 15–30k pageviews or $45–$90 in revenue.
Please note that is a very rough estimate as it really depends on your market, click-through rates, etc. These calculations merely serve to give you a way to make your own estimation.
Assuming those are monthly numbers you should also keep in mind that's probably not worth the overhead for larger advertisers to deal with you. If you're set on monetising at this early stage you might be better of with affiliate programs and get paid per conversion.
Thanks for shedding some light on this for me (in plain English)🙌🏻 I'm looking into affiliate programs and for paid content like online courses, eBook etc. but I'll focus on some audience and traction first. Thanks again!
Always know what to work on next.
If I don't know exactly what I can work on next, I tend to waste time on irrelevant things.
So have a list of actionable todo's (i.e. very specific, begin with a verb, clear concept of what finished state looks like, etc).
Thanks. That's really helpful.
I'm not sure yet how to solve the character count problem though. As there's no easy way to count the number of characters when writing the Instagram caption. It appears when using Instagram's "Send to Twitter" feature it just cuts off the caption.
The obvious answer is to go to China and buy an iPhone there.
Alternatively you can try and find someone you trust to buy the phone and have it shipped to you. If you don't know anyone in China, you can use a service that does this for you. They will give you a local address you enter as the shipping address when ordering from the Apple website. Once they receive the package they will ship it to you in the U.S.
I believe this type of service is called "package forwarding". I don't have any experience with it, and I'm not sure about the legality (probably fine) and costs (service fee + overseas shipping + insurance + import duties, etc).
Here's one I found: www.tiptrans.com
Be sure to read the fees, terms, and restrictions. I noticed they don't allow Apple products for some of their warehouses.
Oh, and one more option would be to check eBay. I imagine there are people who have gone to China to buy some, to then resell in the U.S.
I will go to China, Govt is shut down here