cancel
Showing results for 
Search instead for 
Did you mean: 

Correct method and storage of interface

SOLVED

Correct method and storage of interface

I am currently writing an interface between Magento2 and Ostendo and have a couple of questions.

 

I have written a controller but not sure if this is the correct way to do it?

Currently is is being stored in app/code, should it be somewhere else?

How would I call it from a cron job?

How would I send it arguments?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Correct method and storage of interface

Hi @kevin_marshall2 

 

Yes you have written your custom module and its controller in app/code directory - so that is perfectly correct and even it is best practice to create custom module in the app/code directory.

 

Moving forward on your other questions, i would suggest you to see/read few blogs for create custom module with cron job setup so you will get better idea how exactly it will works

 

Following i am sharing few links which helps you to achieve the same.

 

https://devdocs.magento.com/videos/fundamentals/create-a-new-module/

https://devdocs.magento.com/guides/v2.3/config-guide/cron/custom-cron-tut.html

https://www.mageplaza.com/devdocs/magento-2-create-cron-job/

 

 

Hope it helps ! 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

8 REPLIES 8

Re: Correct method and storage of interface

Hi @kevin_marshall2 

 

Yes you have written your custom module and its controller in app/code directory - so that is perfectly correct and even it is best practice to create custom module in the app/code directory.

 

Moving forward on your other questions, i would suggest you to see/read few blogs for create custom module with cron job setup so you will get better idea how exactly it will works

 

Following i am sharing few links which helps you to achieve the same.

 

https://devdocs.magento.com/videos/fundamentals/create-a-new-module/

https://devdocs.magento.com/guides/v2.3/config-guide/cron/custom-cron-tut.html

https://www.mageplaza.com/devdocs/magento-2-create-cron-job/

 

 

Hope it helps ! 

if issue solved,Click Kudos & Accept as Solution

Re: Correct method and storage of interface

It depends on the context of what is being stored in `app/code`. Here are a few scenarios:

1. **Magento 2 Development:**
If you are referring to Magento 2, then `app/code` is indeed the correct place for custom modules. This directory is used for modules that are developed in-house or by third parties and not available through Composer.

2. **General Code Storage:**
If you are working on a web application and have your code in `app/code`, it's a common practice to store application logic and modules in an `app` directory. However, the exact structure can vary depending on the framework or the application's architecture.

3. **Configuration Files:**
If `app/code` is being used to store configuration files, they might be better placed in a separate `config` directory for better organization and clarity.

4. **Best Practices:**
Following best practices for your specific framework or platform is essential. Many frameworks have specific conventions for directory structures to maintain consistency and readability.

Could you please provide more details about the framework or type of application you are working on? This will help in giving a more specific recommendation.

Re: Correct method and storage of interface

 **Configuration Files:**
If `app/code` is being used to store configuration files, they might be better placed in a separate `config` directory for better organization and clarity.

4. **Best Practices:**
Following best practices for your specific framework or platform is essential. Many frameworks have specific conventions for directory structures to maintain consistency and readability.

Could you please provide more details about the framework or type of application you are working on? This will help in giving a more specific recommendation. Instander APK

Re: Correct method and storage of interface

Brilliant information here! Hopefully you wont stop the flow of such magical material!

ΜΑΓΟΣ ΓΙΑ ΠΑΡΤΥ

Re: Correct method and storage of interface

Configuration Files:**
If `app/code` is being used to store configuration files, they might be better placed in a separate `config` directory for better organization and clarity.

4. **Best Practices:**
Following best practices for your specific framework or platform is essential. Many frameworks have specific conventions for directory structures to maintain consistency and readability.you can also check for my website.

Gemini Apk

Gemini Apk employments Google’s smarts to offer assistance you with all sorts of things. Chat with this AI maestro to brainstorm thoughts for your composing issues.

CapCut

Could you please provide more details about the framework or type of application you are working on? This will help in giving a more specific recommendation.  video editing

Re: Correct method and storage of interface

Could you please provide more details about the framework or type of application you are working on? This will help in giving a more specific recommendation. Url