# How to start and structure a new application?

**URL:** <https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857>\
**Category:** New to Julia\
**Created:** [September 18, 2020, 4:45pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857 "2020-09-18T16:45:17Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 4:45pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/1 "2020-09-18T16:45:17Z")

</div>

Hi,

I just read the docs about Pkg.jl and there in the glossary we can find the definition of the three words project, package and application.

Project: is an umbrella term: packages and applications are kinds of projects  
Package: Code that’s intended to be reused.  
Application: Standalone code

Now let’s say I want to make a very small application that does something fancy called FancyApp. How exactly do I initiate such a new application and what’s its structure?

E.g. is there a command that generates me an dummy application (not a package)? Or could I just e.g. create the following empty files and directories:

FancyApp  
- src/FancyApp.jl  
- Manifest.toml  
- Project.toml

Furthermore, is it possible to just navigate there with my own terminal and then do “julia” and julia knows “Ah, I’m in the application FancyApp”?

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 18, 2020, 4:58pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/2 "2020-09-18T16:58:08Z")

</div>

> navigate there with my own terminal and then do “julia” and julia knows “Ah, I’m in the application FancyApp”?

You would still have to write `]activate .` to actually activate the environment.

Read up on one way to automate this: [Activating project environment in Julia REPL automatically | Blog by Bogumił Kamiński](https://bkamins.github.io/julialang/2020/05/10/julia-project-environments.html)

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 18, 2020, 4:59pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/3 "2020-09-18T16:59:54Z")

</div>

> [@pascal-mueller](#):
>
> is there a command that generates me an dummy application (not a package)?

Not quite but there’s `generate` integrated into `Pkg`. Read up on a possible workflow here: [My practices for managing project dependencies in Julia | Blog by Bogumił Kamiński](https://bkamins.github.io/julialang/2020/05/18/project-workflow.html)

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 18, 2020, 5:00pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/4 "2020-09-18T17:00:35Z")

</div>

Check out [PkgTemplates.jl](https://github.com/invenia/PkgTemplates.jl)!

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 5:00pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/5 "2020-09-18T17:00:42Z")

</div>

where? 🙂

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 18, 2020, 5:00pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/6 "2020-09-18T17:00:54Z")

</div>

`] generate`

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 5:01pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/7 "2020-09-18T17:01:30Z")

</div>

> [@fbanning](#):
>
> :

Yeah, I thought so. I hope that I can basically just create my application at and then cd path; julia; and it automatically set’s everything up like the environment. That’s not possible?

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 18, 2020, 5:01pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/8 "2020-09-18T17:01:34Z")

</div>

Sorry, forgot to paste the link. 😃

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 18, 2020, 5:06pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/10 "2020-09-18T17:06:44Z")

</div>

Thanks! I was googlin for such an article. It summarizes everything perfectly.

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 18, 2020, 5:12pm UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/11 "2020-09-18T17:12:31Z")

</div>

No problem. Bogumil’s blog is a gold mine, so don’t hesitate to read a few more of his articles. 🙂

Otherwise don’t hesitate to just post here for bigger questions or on Slack/Zulip (whichever you prefer) for smaller or more casual questions.

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 19, 2020, 8:54am UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/12 "2020-09-19T08:54:43Z")

</div>

I don’t see why he checks for both, the Project.toml and the Manifest.toml.

If you use `generate` you only have a Project.toml and no Manifest.toml. The later only exists once you added dependencies.

So shouldn’t it rather only check for Project.toml?

---

<div class="post-metadata">

**Author:** ![fbanning](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fbanning/32/14972_2.png) [@fbanning](https://discourse.julialang.org/u/fbanning)\
**Post date:** [September 21, 2020, 10:25am UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/13 "2020-09-21T10:25:57Z")

</div>

> [@pascal-mueller](#):
>
> I don’t see why he checks for both, the Project.toml and the Manifest.toml.

He wrote:

> We are informed that Project.toml and Manifest.toml were updated. Let us inspect their contents from within Julia as an exercise:  
> …  
> In general `Manifest.toml` contains the exact specification of all dependencies of our project (direct and recursive) and `Project.toml` lists only essential information about direct dependencies.

So he just checks for Manifest out of curiosity and to explain their differences. It’s not needed, of course. Just a little extra info for the interested reader.

---

<div class="post-metadata">

**Author:** ![pascal-mueller](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pascal-mueller](https://discourse.julialang.org/u/pascal-mueller)\
**Post date:** [September 29, 2020, 9:19am UTC](https://discourse.julialang.org/t/how-to-start-and-structure-a-new-application/46857/14 "2020-09-29T09:19:34Z")

</div>

Thanks
