bug-artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-artanis] ENTRY not loading modules


From: Julio Claudio Matus Ramirez
Subject: Re: [Bug-artanis] ENTRY not loading modules
Date: Tue, 21 Aug 2018 22:38:53 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Thanks for the merge!


More comments:

1.

> Maybe it's redundant to mention it here, if users want to import, they
> will do it.

I just wonder how will the users ever know they have to add it in the
controller if it isn't explained anywhere ;)
The manual is inconsistent in that sense. Since it tends to explain
things fairly obvious, like:

"db.enable = <boolean> : Whether to use database, "

But when you're trying to import modules to add to use in the
controller/view, there are like no hints...

Or maybe I'm missing the explanation somewhere in the manual... if so
please let me know and I'll give it another read.


2.
>> the whole setup and code actually work together. But it'd be nice to
>> have more examples like this in the official documentation rather than
>> 3th party individual users' code.
>
> Actually, Artanis contains 2 mode, the first is simple mode, which is
> what you are referencing, the second is the application mode, which
> should be create by 'art create'.
>
> Sometimes we do need simple mode, you can make a restful service quick
> and dirty. For application mode, you have to care about more things.


Yeah, I'm not saying that "simple mode" is not necessary. Just that
there are like no examples about the "application mode", and that it'd
be nice to have more of that. Since it "application mode" is what most
people look for when thinking of a web framework, or at least what most
people is used to when coming from another web frameworks I guess.



Anyway, for 1 and 2, I hope I can contribute to improve these issues.


3. 
About the html page in the gnu site.

https://www.gnu.org/software/artanis/manual/manual.html
I see the html doc here is still in the old version. Do you do this
update manually/periodically?

4.
About my last MR.
https://gitlab.com/NalaGinrut/artanis/merge_requests/93/diffs

I was actually hoping you gave me a comment on:

> Please also check line 1690 (starting on TODO) since I wasn't able to
> fix that sentence that seems to contradict itself.

(written in the description of the Merge Request)
And I could fix that before the merge.
But since it's already merged, maybe you'd like to check those lines out
and correct them. JFYI.


Sorry for the long mail.
Cheers,


Nala Ginrut <address@hidden> writes:

> Julio Claudio Matus Ramirez writes:
>>
>>>From this, I guess depending on the person, people can think:
>> "This is the startup file, so I guess adding my modules here will make
>> it work for the whole program. Since it makes no sense to import modules
>> to the start up file unless it makes them valid through the whole 
>> application"
>>
>> Yet, it only works for the ENTRY file.
>>
>> Unless this is clearly documented somewhere, I think this is how many
>> people would interpret this sentence.
>
> Agreed
>
>> So, the "comment" and the actual "function" are kind of far from a
>> perfect match.
>> Therefore, my merge request changing the comment so it's more clear.
>>
>> I hope you like my merge requests ;)
>
> Applied ;-)
>
>>
>>
>> Putting that aside, I have a couple of questions:
>>
>> 1. For what reason would people import modules to ENTRY?
>
> In our practical development, we need to do something before Artanis
> bootup the server-core. For example, register customized hooks, add
> addtional module load path, init your own specific configuration, etc.
> Every necessary step that must run before bootup server-core has to be
> put in ENTRY.
>
>> 2. ENTRY has a "add modules here!" section, but nothing like that on the
>> controller template. And no explanation in the documentation
>> either... Any reason? Any "phylosophy" I'm missing? If not I'd like to
>> have it somewhere...
>
> Maybe it's redundant to mention it here, if users want to import, they
> will do it.
>
>> As an extra comment, having read the whole documentation btw, I see lots
>> of examples based on "script-like" code, loading the artanis modules and
>> defining routes and everything all in one file. Since GNU Artanis is
>> supposed to be using the MVC model and all, this seems far from its
>> original phylosophy/goal. Since in a true MVC project code would be
>> hardly managed in a script-like one file model. I think I'll personally
>> put my working artanis code somewhere, so new people can understand how
>> the whole setup and code actually work together. But it'd be nice to
>> have more examples like this in the official documentation rather than
>> 3th party individual users' code.
>
> Actually, Artanis contains 2 mode, the first is simple mode, which is
> what you are referencing, the second is the application mode, which
> should be create by 'art create'.
>
> Sometimes we do need simple mode, you can make a restful service quick
> and dirty. For application mode, you have to care about more things.
>
> Best regards.
>
>>
>> Cheers,
>>
>>
>> Nala Ginrut <address@hidden> writes:
>>
>>> Hi Julio!
>>> I found your bug report on web page:
>>> https://lists.gnu.org/archive/html/bug-artanis/2018-07/msg00000.html
>>>
>>> Somehow my mail client seems filtered you mail. I need to check my SPAM
>>> config.
>>>
>>> Anyway, what you reported is not a bug.
>>> I think the line mentioned in ENTRY confused you, but it actually means
>>> "import modules needed in ENTRY file". If you want to use something in
>>> your controllers or any other module outside ENTRY, you have to import
>>> in that module respectively.
>>>
>>> The module imported in ENTRY will not appear in other module.
>>>
>>> Hope this help you.
>>>
>>> Best regards.
>>>
>>> --
>>> GNU Powered it
>>> GPL Protected it
>>> GOD Blessed it
>>> HFG - NalaGinrut
>>> Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
>>>
>
>
> --
> GNU Powered it
> GPL Protected it
> GOD Blessed it
> HFG - NalaGinrut
> Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
>

-- 
diaspora: sysad.org/u/rikijpn
GPG key: http://pgp.mit.edu/pks/lookup?op=get&search=0x280640B9A94C170D



reply via email to

[Prev in Thread] Current Thread [Next in Thread]