rhomobile / rhomobile-docs

Documentation for Rhomobile projects, in the form of a sinatra app.
http://docs.rhomobile.com
41 stars 22 forks source link

Where are the docs? #225

Open randoum opened 10 years ago

randoum commented 10 years ago

Greetings,

I am using this http://docs.rhomobile.com/en/4.1.0/guide/apisummary as a start page for the docs, but I cannot find any reference to many things such as the documentation of RhoController and particularly methods such as url_for, or even a clear explanation on how callback works, or if I can use a callback to a regular ruby class that does not inherit from RhoController, or so many things that are unclear to find a documentation about, or event by reading the source. So my question: How to find the complete documentation?

Thanks

randoum commented 10 years ago

Controlers before_filters, Rho::Network error codes and exceptions (other than http status code), Localization, debugging under linux, what is this intriguing @params seen in every callback, etc...

michaelToews commented 10 years ago

These concepts that you are asking about are not RhoMobile specific but are general web programming / Rails concepts.

To learn about them, please refer to W3 Schools and some Rails tutorials.

michaelToews commented 10 years ago

As for the RhoMobile specific references: RhoController Rho::Network - What sort of error codes are you asking about?

randoum commented 10 years ago

Hi and thanks for your interest,

First I realized I forgot to introduce myself: I write code since almost 30 years, used dozen of languages and dozens of frameworks, delivered hundreds of desktop based and web based applications. So thanks for the school links but they won't help.

What I mean in my original message is that the documentation and the guide are really not accessible for someone discovering the framework. I learned a lot more by looking into the source code than reading the guides and doc, and this is not correct while being at the very beginning of the learning curve.

Where is explained the naming convention of the app directory? Where are the params accepted by render? Where is the doc explaining redirection and callback in a general point of view? How to generate a database table? How a model manage record id? ... There is hundred of other question that a person discovering the frameworks can ask himself, and the doc sometime provide a piece of answer, not always in the expected location, and sometime nothing.

Example: the RhoController doc (you posted the link to version 2.2 btw) there are only 2 methods documented app_info and app_error. Is that all you can interact with the controller? I don't believe so. where is the rest?

Example: I had to encode a string before sending a request to the server. There is no documentation on how to do this. Finally -I don't remember how- I found Rho::RhoSupport.url_encode. Have you try searching for url_encode from the search box of the documentation? You are sent to a general introduction of version 2.2. So given you are starting to use the framework, you must guess the name of the url_encode method to be able to find in another version's documentation that it's part of Rho::RhoSupport.

And so many other things I won't take time to report. I gave up using the documentation, and sadly there is not much available in Google. The documentation as it is now is incomplete to be used by a beginner, and too shallow to be used by an advance user. If you guys want more people to use this framework you should really focus on creating a complete and easy to access documentation. I stick on RhoMobile because for this specific project it's a client requirement, but otherwise I would have give up the framework a long time ago because it is extremely time consuming. We are very far away from Ruby and Rails "fun to code" kind of things.

Lastly and to conclude I would like to apologize for the content of my message which can be disappointing to read for a person which is giving his time to write the documentation, but the critic I wrote need to be heard in order to improve the doc

Thanks and regards

jtara commented 10 years ago

concepts that you are asking about are not RhoMobile specific but are general web programming / Rails concepts.

The problem is, Rhodes is not Rails. It is in some ways inspired by Rails. Pointing people to Rail documentation is just going to confuse them and raise expectations that will not be satisfied.

I do think that the MVC discussion should be complete in itself without reference to Rails. (It doesn't even reference Rails, though! There just seems to be some unwritten assumption.)

randoum commented 10 years ago

Another example, I'm looking for the way to use database transactions:

1- http://docs.rhomobile.com/en/5.0.0/api/Database click on example "Using Transactions" It is said that startTransaction is a class method of Rho::Database which is wrong (bravo for the messy indentation in the ruby example by the way)

2- http://docs.rhomobile.com/en/5.0.0/guide/rhom_ruby#transactions It is said that startTransaction is an instance method, but in this example Rho::Database.new comes without the mandatory arguments, which leads to argument missing error

It's just very confusing, so as a learner I would search into http://docs.rhomobile.com/en/5.0.0/api/Database on example "Open and close database" and find this snippet db = Rho::Database.new(Rho::Application.databaseFilePath('test'), 'test')

Is RhoMobile application default database named "test"? I don't believe so

I finally found my answer (db named 'local' if someone interested read this) by browsing the app internal directory and looking into the sqlite files.

This is definitely another important piece of information to share in a "guide" kind of documentation. The documentation as it is now is time-wasting, incomplete, confusing and frustrating. Let me know if you guys have any plan to improve that or if I should not expect any change.

Regards