Flash Builder folder structure + .fla workflow - actionscript-3

I built 3 variations of a game for different platforms (i.e. Facebook, mobile etc.) in Flash CS4.
I now have the following structure (5 folders):
Facebook
Mobile
Website
Shared_classes
Shared_assets
In each of the top three folders there is a .fla file.
Every .fla uses assets and classes from the "shared folders" but also platform-unique code.
I would now like to migrate this project to Flash Builder but
1) what is the best approach to stay organized?
2) what is the best .fla file workflow?

Well, that depends... if you ever want to migrate to Flex4 and use Maven2 to automate the build, you might want to organize your project as follows:
project-folder
|- common
| |- CommonModule.fla
| |- src
| |- test
|- platform1
| |- Platform1Module.fla
| |- src
| |- test
|- platform2
| |- Platform2Module.fla
| |- src
| |- test
|- ...
I unfortunately didn't organize it this way, and have recently been clobbered when trying to switch away from Adobe's over-priced IDE that doesn't even support building from the commandline. (How on earth is one supposed to perform integration testing or define pre-/post-commit hooks without commandline builds?)

Related

How to run a github action only on a specified folder?

I have a monorepo setup and I want to introduce CI/CD into it using Github actions. I want a separate workflow for each service. So far, I have figured out that you can use path filtering to limit when an action is run BUT I have yet to figure out how to have the action run only on a specified folder/path.
This is my current structure:
mono-repo --
|
|- services --
| |- service1
| |- service2
|- .github --
|- workflows --
|- service1.yaml
|- service2.yaml
Any help is deeply appreciated. Thank you in advance.

How to structure separation and namespaces in CQRS?

I'm looking for advice on how to structure namespaces in a CQRS structured application.
Currently the command-side and the query-side are in the same namespace in each bounded context, but as complexity is growing, it is starting to create problems.
Currently the structure has the following folders which each contains the implementation:
Application
+ Api
+ Cli
+ Web
Domain
+ Action (Command and Command Handlers in one - we are not using a CommandBus)
+ Event
+ Model
+-- Project
|-- Project.file
|-- ProjectRepository.file
Infrastructure
+ Consumer (Projections and ProcessManagers)
+ EventStore
+ Persistance (Denormalized read side)
+-- Project
|-- SqlProjectRepository.file
Common (Supporting namespace)
The issue is now that the Domain Model currently contains both the entities and event sourced aggregate root which are essentially only part the query-side and command-side, respectively.
There is no overlap in the aggregates of the query-side and command-side.
In a refactoring to a separation, where should the slice be made?
Suggestion 1
A full slice resulting in a query and a command-side which means that even the Application layer has read and write side.
Suggestion 2
A slice which is only made on the Domain layer so that the query side contains the (quite anemic) entities of the read model and the command-side holds events, event sourced aggregate root and more.
Please make a 3rd suggestion, if mine do not apply. Thanks.
This is the approach I take - based on CQRS and DDD, noting that our DDD extends to having a separate solution (.NET - Web APIs for different domain bounded contexts).
Secondly, all our infrastructure code, auth handling, and shared code - is done in a private package manager, which removes some of the mess, of a single solution, we DI it in the StartUp (DI). Also note we use EntityFramework as our DB implementation.
However, given that, here is how I and my team, separate out CQRS and DDD.
+ App
+- Command
+-- Application.Command
+-- Data.Command.EntityFramework
+-- Domain.Command
+- Query
+-- Application.Query
+-- Data.Query.EntityFramework
+-- Domain.Query
+ Build
+- Pipeline
+ Database
+- Data.Database.EntityFramework
+- Data.Database.Model
+ Test
Api (API app)
Cli
Currently the structure has the following folders which each contains the implementation...
That's unfortunate.
You are likely to be happier with the maintenance burden if you arrange your name spaces such that things that change together are closer together. Your FrobMarbleRepository belongs in the frobmarble namespace, not in the repository namespace.
I don't think I agree with Jimmy Bogard's complete analysis here, but the lesson of focusing on features is important
https://jimmybogard.com/vertical-slice-architecture/
If you happen to need to use the same name for two different ideas within a single feature, then you might end up splitting that feature into two or more namespaces; on the other hand, the need to re-use a name might indicate you are actually dealing with more than one feature.

Alembic, SQLAlchemy and multiple "apps" inside a project

Coming to SQLAlchemy from the world of Django, I would like to have a project split into several apps, where models and views are bunched together according to their purpose.
For example, I am writing a planner app, I would like to have Users and Plans to live in separate apps inside my project. I want to make sure that if I have to split this project into smaller ones, I would have the least amount of work to do possible.
I also would like to be able to generate and run migrations with one command correspondingly, so that I don't have to reconfigure my CI builds every time I add a model or an "app".
So far what I could come up with in this respect is
project structure:
my_planner
+- users
| +- migrations
| | +- versions
| | | +- 0000_initial.py
| | +- __init__.py
| | +- env.py
| | +- script.py.mako
| +- __init__.py
| +- models.py
+- plans (same structure as users)
alembic.ini:
[alembic]
script_location = alembic/migrations # this doesn't seem to matter
version_locations = users/migrations/versions plans/migrations/options
[users]
script_location = users/migrations
[plans]
script_location = plans/migrations
And then I had to place env.py files into my migrations folders and import the models I want to be included into automatic migrations.
However, when I generate my automatic migrations, I have to specify the exact "apps" for which I generate them and specify a branch.
PYTHONPATH=. alembic --name users revision -m 'initial' --rev-id='0000' --branch-label users --autogenerate
And when I apply the migrations, I have to apply them separately for each of the branches.
Is there a way to do these things in one command correspondingly without writing my own custom scripts? Or is there another approach to managing migrations?
Unfortunately, I've not found an out of the box way to do this. I wrote about the approach we went with here.
The gist of it is;
Create common migration functionality
Add a migrations directory with app specific information to each app(schema, metadata)
Add your relevant app sections to the alembic.ini file, referring to each directory
Use branches starting from the base to track each app's migrations separately

What is the proper way to set modifiable install path in PackageMaker?

First of all, I'm talking about PackageMaker, a GUI application; not packagemaker, a command-line program.
I'm trying to make a install package that has three components, installed in different locations:
XxxxBin.app application, default installed to /Applications;
Xxxx.bundle plugin bundle, default installed to /Library/Audio/Plug-Ins/VST/ (and renamed to Xxxx.vst, which is very easy to be achieved by using post-install script);
some resource files, default installed in /Library/Company/Xxxx_resources/.
And I want to allow users to change target directories of each compnent during installation.
I noticed there are two layers in PackageMaker: choice and package. When you drag an app/bundle/directory into PackageMaker, it will create a new choice and a new package. However, both choice and package layer contains Destination, which greatly confused me. In addition, in Components page for packages that is derived from an app or bundle, there is a check box labelled "Allow Relocation", which introduced further confusion.
I failed to find detailed information on those options. And after many attempts, I'm using the following layout and combination of options, that are very close to my target:
three choices and packages, each contain the app, the bundle, or the directory of resources.
in all choice layers, fill the Destination entry with actual default install paths, and select the "Allow alternate volume" checkbox;
in all package layers, fill the Destination entry with /, and select the "Allow custom location" checkbox;
in all Components page in package layers, deselect all Allow Relocation checkbox.
However, it still has a very weird behavior: the app is copied twice, to both its own directory, and overwriting the directory of the plugin bundle. If you "show content" on the installed bundle, it will look something like this:
/Library/Audio/Plug-Ins/VST/Xxxx.vst
|
+contents
|
+-info.plist: after looking on its content, it is actually the app's plist, not the bundle's
|
+-MacOS
| |
| +-Xxxx: the bundle's dynamic library, which is expected to be here
| |
| +-XxxxBin: the app's executable, which is NOT expected to be here
|
+-Resources
|
+-Xxxx.xml: some config info for the bundle, which is expected to be here
|
+-icon.icns: the app's icon, which is NOT expected to be here
I am quite exhausted on this stuff, but still not reaching my target that looks pretty simple: user-changeable install directory for multiple components. It's really appreciate for someone who can drag me out of this quagmire. Thanks for a lot!
Finally I found the actual cause is not in PackageMaker stuffs, but is inside the bundles being packaged. The bundle identifier of both the app and the plugin is empty. After I assign them with distinct values, everything just work fine.

Configure PHP CodeSniffer to fix code on the fly in PhpStorm

I have PhpStorm 10 and want to setup php Code Sniffer to automatically correct me code. This article https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm points to "Project Settings | Code Style" and I cannot even find that. I have File | Edit | View | Navigate | Code | Refactor | Run | Tools | VCS | Window | Help at the top and have no idea where to find project settings. I do have File > Settings but cannot figure it out.
My project is a web portal built in Symfony. I saw a colleague run Atom and when he saves a file it is code-fixed on the fly - that is what I want. Help please.
PhpStorm does not support code fixing on the fly with Code Sniffer.
https://youtrack.jetbrains.com/issue/WI-25815 -- watch this ticket (star/vote/comment) to get notified on any progress.
Right now, if you wish you may create an External Tools entry for that and run it manually when needed.
Find this from web (how to config the external tools)
https://thiagoponte.wordpress.com/2015/08/03/run-php-codesniffer-code-beautifier-and-fixer-from-phpstorm/