How to implement EF 3.0 LCIA method in Brightway2? - brightway

For a project I need to use LCIA method EF 3.0. The JRC has provided all sort of files: https://eplca.jrc.ec.europa.eu/LCDN/developerEF.xhtml.
However I don't have any clue how I could implement this in bw2, as I'm just starting to use bw2. Does someone have experience in implementing EF 3.0 in bw2 who can help me with this?

Implementing EF 3.0 is basically impossible for someone who is just starting, as you need to have strong knowledge of the whole Brightway stack, as well as LCA, including its unstated assumptions and common metadata. However, you aren't the only one working on this, so we will take it up in the developer's circle, and try to get a method implemented by June 2021.

Related

exception while reverse engineering the java code using STAR UML

I am trying to reverse engineer java code in starUML. But i am getting Unrecoverable Parse error. please tell me reason for this?
You need to swap to a new tool for reverse engineering.
The best tool is EclipseUML omondo but really too expensive. A trick is to download the old zip 30 days evaluation build at: http://www.uml2.org/eclipse-java-galileo-SR2-win32_eclipseUML2.2_package_may2010.zip
Just unzip and it works immediately for 30 days. This is standalone build including Eclipse and all needed plugins.
You don't need to buy the tool just make your reverse engineering with this evaluation bundle and copy into your documentation what you need.
STAR-Uml is quite old an probably unmaintained. I guess your code uses new features like generics and Star-UML cannot parse them.
The "Unrecoverable Parse error" occurs due to Star UML not able to support Generics in the Java code.
Star UML doesn't support Java Annotations, try to do reverse engineering after removing the annotations in the code.

Using Dapper in MonoTouch

Since I'm a big fan of Dapper and using it for a couple SQL Azure Projects I would like to use on MonoTouch as well against the built-in Mono.Data.SQLite.
I realize that Dapper's speed comes from the dynamic code generation which unfortunately is a big no-no on iOS where everything has to be compiled ahead-of-time by MonoTouch.
First question: Has anyone made any efforts to provide reflection based implementation of the relevant parts of dapper? (I know it will be a LOT slower) If not how hard would it be to implement it (only glanced over the Dapper source).
Second question: I hope I am not sounding naive here but would it be remotely possible to write a little utility that would materialize the dynamically generated IL for your entity POCOs into an IL assembly source file that could be added to your MonoTouch project and thus gets AOTed during build time? Or is this impossible due to joins and QueryMultiple etc?
Note: I realize there is at least one attempt to port Dapper to MonoTouch but glancing over the source I have no idea how's that supposed to fly since all the dynamic method generation stuff is still in there.

Subsonic and CSLA.NET

Can SubSonic be used with CSLA.NET? Has anyone tried this. From my understanding
SubSonic is a DAL
CSLA.NET is a BAL (BLL)
I can't seem to find any information on this.
SubSonic could be used as a DAL. I had a some trouble implementing a DAL at first when I was learning CSLA just because there is little documentation on this subject. I would recommend checking out our templates. We have a complete working Parameterized SQL or Stored Procedure driven DAL. This is all sub templated out so you could easily implement or copy 8 sub templates and change it to use SubSonic and all of your BO's would now be driven by SubSonic in a very small amount of time.
Thanks
-Blake Niemyjski (Author of the CodeSmith CSLA Templates)
It looks as though you will need to kludge around some issues to get CSLA to talk via your own DAL - see http://www.lhotka.net/Article.aspx?area=4&id=2e6468d6-9a02-4f0e-a31c-a7eecc268e1b
There is also a more detailed forum discussion on the subject at http://forums.lhotka.net/forums/thread/3714.aspx
SubSonic is pretty well encapsulated so you can use it with just about anything. You can put the DAL that SubSonic generates in its own separate class library and/or namespace.
No experience with the CSLA.NET side of things.

what is subsonic?

I'm lost here, can someone explain to me what subsonic is?
is it a code generator type tool?
"SubSonic is A Super High-fidelity Batman Utility Belt that works up your Data Access (using Linq in 3.0), throws in some much-needed utility functions, and generally speeds along your dev cycle."
Depending on how you use it, it does involve code generation (t4 templates used to create classes that represent your database objects).
This website, Wikipedia, tells me its an ORM (Object-Relational Mapper)
As it's creator Rob Conery says, it's the Swiss Army Knife of ORMS.
Here are some other questions where you can find out about SubSonic:
What ORM is the best when using stored procedures
Best free ORM to use with .Net 3.5
If you haven't go to SubSonic's site and watch some of the tutorials. You find that it is easy to become in under 30 minutes.

Design by contract/C# 4.0/avoiding ArgumentNullException

I'm terribly tired of checking all my arguments for null, and throwing ArgumenutNullExceptions when they are.
As I understand it, C# 4.0 enables some design by contract constructs. Will it be possible to specify that a method will not accept null arguments in C# 4.0?
Also, is there anything I can do in the meantime (maybe an attribute?) to avoid this monotonous task of checking for null and throwing?
You can create a NotNull<T> generic class that helps, but there are some side effects. See Robert Nystrom's blog post.
Rick Brewster describes a good solution for concise, declarative style parameter checking in this post,
http://blog.getpaint.net/2008/12/06/a-fluent-approach-to-c-parameter-validation/
Avoids use of reflection (drawback of DbC) and creates no overhead for non-exceptional code path.
Like how he uses extension methods to allow what appears to be instance method calls on null objects. Very clever bit of coding IMO.
If you are sold on DbC, Google Spec# and PostSharp.
Not sure about native DbC constructs in C# 4.0 but Microsoft is going to release cross-language Contracts library.
You can download version for MSVS2008 here.
As an alternative to the already given answers, it is worth looking into the Null Object design pattern.
The essence of this design pattern is that once the "null object" is created, there is no further need to perform any checks for null and the methods of the null object implement the behavior desired whenever a null (otherwise) would have been passed vs a reference to a "real object".
This design pattern does not depend on C# 4.0 and in fact can be easily implemented in almost any OO programming language.
I have just started using Code Contracts its a new feature in C# 4.0 you need to download an addin from MS to allow you to see it in your project settings. Details here ->
http://research.microsoft.com/en-us/projects/contracts/

Resources