redpotion icon indicating copy to clipboard operation
redpotion copied to clipboard

Idea: scaffolding generators

Open andrewhavens opened this issue 9 years ago • 4 comments

Hello! This is a continuation of a conversation that started on Twitter. Just creating this issue to start the conversation around this feature.

It would be really useful to have a scaffolding generator, much like Rails, which would provide the basic CRUD operations. This would also serve as an example of how to wire up views, create forms, and work with CDQ. A simple ToDo list example app would go a long way in helping beginners to learn iOS/ProMotion/RedPotion. I don't know of anything like that.

Another common task is working with an API. Another potential scaffolding generator could be the same CRUD operations using AFMotion instead of CDQ.

Let me know what the next steps would be in implementing this. I'm happy to help. Though I must admit that I'm still relatively new to iOS/RubyMotion development.

andrewhavens avatar May 08 '15 06:05 andrewhavens

It's a good idea. I was thinking of doing a screencast of this also. We can do the CDQ now. We're still working on the best practices for API/Json; we've done it 10 different ways.

twerth avatar May 08 '15 16:05 twerth

@andrewhavens actually what would be a great help is to come up with the "simple ToDo" list example app". Define its requirements. I can program it. I've been wanting to create an example video that uses CDQ.

Or you and I can program it. If you have time you can start it then I can suggest any improvements (idiomatic RedPotion stuff).

It should be as simple as possible, but be functional and then we can add a bit of "wow" to it. Once it's programmed, then I can record myself rewriting it for the video. Plus we'd have the actual code.

You could also put it in your own repo if you like.

Just thinking out loud.

twerth avatar May 10 '15 14:05 twerth

Hi @twerth, sorry for taking over a year to respond to this! Now that I have a lot more experience with RedPotion, I've taken the liberty of building the example Todo list app. https://github.com/andrewhavens/redpotion_todos_app_example

Now that we have this codebase, I'd like for you to review it (and anyone else who would like to review), then I will get started building the generators for this. In the readme I've listed a few examples and diffs of the code that I expect to be generated.

Let me know what you think. Thanks!

andrewhavens avatar Jun 06 '16 18:06 andrewhavens

Just wanted to update this thread to say that I've made some progress on this lately. I created a new gem called redpotion-generators that provides some nice scaffolding generators.

andrewhavens avatar Oct 10 '16 06:10 andrewhavens