I am experimenting with my first Dart web app and do not expect to make any part of my app a reusable library for other apps/libs. As such, I do not have a lib
directory in my project; rather, I have a web
directory.
I guess my intent is to have my web
directory look like this:
web/
Main.dart <-- where my main method is
logging/
Logger.dart
LogLevel.dart
model/
Signin.dart
Signout.dart
view/
SigninView.dart
signinView.html
presenter/
SigninPresenter.dart
...lots of other packages
Several questions:
- Should my entire application (everything under
web
) be considered to be a part of the samelibrary
? If so, would I then putlibrary myapp;
at the top of every Dart file? Otherwise, what is the level of granularity for alibrary
? Should I put it package-level, and haveLogger
andLogLevel
insidelibrary logging;
? Is it at the class/file level and have alibrary logger
and alibrary log_level
? - Is my
web
directory set up correctly? I'm coming from Java so I'm treatingweb
the same as Java/Maven'ssrc/main/java
directory, and setting up a package structure underweb
that makes sense to me... - I understand that the
import
keyword is for importing source types from other packages. But what aboutexport
- what does that do?