[Top][All Lists]

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

Re: [Bug-artanis] ENTRY not loading modules

From: Nala Ginrut
Subject: Re: [Bug-artanis] ENTRY not loading modules
Date: Tue, 21 Aug 2018 02:30:43 +0800
User-agent: mu4e 1.1.0; emacs 25.1.1

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.


> 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

Attachment: signature.asc
Description: PGP signature

reply via email to

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