<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>NBusiness Forum Rss Feed</title><link>http://www.codeplex.com/Project/ListForums.aspx?ProjectName=NBusiness</link><description>NBusiness Forum Rss Description</description><item><title>New Post: VS2008 Again</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=32788</link><description>&lt;div style="line-height: normal;"&gt;Hello! &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks for the feedback, the version in source currently works with 2008 but it isn't quite ready for use yet. I've been stumped for a while on the best way to translate E# into actual code. It turns out that most of the view engines out there (translating meta data into code) have been much too limited for my needs so I've been struggling to complete that final bridge.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;However I think I finally have a solution that is well underway and working pretty well, see this blog post for the general idea &lt;a href="http://www.justnbusiness.com/Blogs/Template_DSL_with_MGrammar.aspx"&gt;http://www.justnbusiness.com/Blogs/Template_DSL_with_MGrammar.aspx&lt;/a&gt;. Once this evolves a little bit more I will probably make it as a separate CodePlex project and use it in NBusiness for the templating system... which also means I might end up converting the NBusiness parser into an MGrammar DSL. First things first though.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Sorry for how long this is taking, I've found that creating a DSL end-to-end turns out to be an IMMENSE amount of work. Hopefully though this will change in the future with some of the things I've been working on here.&lt;/div&gt;&lt;/div&gt;</description><author>justinc</author><pubDate>Fri, 02 Jan 2009 20:21:52 GMT</pubDate><guid isPermaLink="false">New Post: VS2008 Again 20090102082152P</guid></item><item><title>New Post: VS2008 Again</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=32788</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br&gt;
&lt;br&gt;
I just want to say that your project seam to me the best way to create application architecture and the E# is a superb idea between the C# and an elegant descriptive language, XML is at the stone age in comparison !&lt;br&gt;
&lt;br&gt;
But I am only in visual studio 2008 so I can't try your projet (that's too bad ! :-( ).&lt;br&gt;
&lt;br&gt;
Any news about the visual studio 2008 integration ? Any date ?&lt;br&gt;
&lt;br&gt;
And do you plan an integration of Linq ?&lt;br&gt;
&lt;br&gt;
Thanks for your great job !&lt;br&gt;
&lt;br&gt;
Anthyme&lt;br&gt;
&lt;br&gt;
PS : Sorry for my english, it's not my first language. 
&lt;/div&gt;</description><author>anthyme</author><pubDate>Fri, 02 Jan 2009 14:43:05 GMT</pubDate><guid isPermaLink="false">New Post: VS2008 Again 20090102024305P</guid></item><item><title>New Post: CSLA 3.6</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=37081</link><description>&lt;div style="line-height: normal;"&gt;Basically it's just me working on it at this point. Right now the v3 &amp;quot;works&amp;quot; well enough to be a proof of concept but there is a way to go before it's ready for production use. Most of the main features are there but there is a lot of polish and debugging left to go.&lt;br&gt;
&lt;br&gt;
I had been making pretty good progress on it but the over the course of the last month I have had wisdom teeth pulled and changed jobs and a variety of other distractions going on. So this project is still &amp;quot;active&amp;quot; but there has been some slow down recently. I have a few CSLA templates banged out, I've been using the Spark View Engine to do this, which has recieved a lot of updates recently. So Spark will probably have to be updated before more templates can be created. If you want to do some work on this I could probably fix up a few things and get you some instructions on how to dive in and contribute. Otherwise the best I can say is to subscribe to the Release RSS feed so you can keep track of progress! There definitely will be more work going on in the future.
&lt;/div&gt;</description><author>justinc</author><pubDate>Sun, 05 Oct 2008 23:05:53 GMT</pubDate><guid isPermaLink="false">New Post: CSLA 3.6 20081005110553P</guid></item><item><title>New Post: CSLA 3.6</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=37081</link><description>&lt;div style="line-height: normal;"&gt;I just found this project, and I love the idea of using a language to define the business objects. Relying on the database as the &amp;quot;source of truth&amp;quot; is not my cup of tea.&lt;br&gt;
&lt;br&gt;
How close are the templates to being able to take advantage of the latest CSLA v3.6? Is anyone actively working on this?
&lt;/div&gt;</description><author>dbilbey</author><pubDate>Sun, 05 Oct 2008 18:36:29 GMT</pubDate><guid isPermaLink="false">New Post: CSLA 3.6 20081005063629P</guid></item><item><title>New Post: VS2008 Again</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=32788</link><description>&lt;div style="line-height: normal;"&gt;Thanks Justin, I got the Entity item in the list.&amp;nbsp; I'll be playing with it a little this weekend to get a feel for the framework - I may have a small project next week where it might come in handy.&amp;nbsp; In that case, I'll of course produce patches for anything that's changed.&lt;br&gt;
&lt;/div&gt;</description><author>tanden</author><pubDate>Thu, 07 Aug 2008 16:32:54 GMT</pubDate><guid isPermaLink="false">New Post: VS2008 Again 20080807043254P</guid></item><item><title>New Post: VS2008 Again</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=32788</link><description>&lt;div style="line-height: normal;"&gt;Ah yes, well there is plenty left to do before it's fully ready but it should work for you in VS 2008. The plugin usability has plenty left to do that's for sure.&lt;br&gt;
&lt;br&gt;
However a few things to note:&lt;br&gt;
&lt;ul&gt;
    &lt;li&gt;The new version doesn't have NBusiness projects! This ends up being a much simpler solution, in the older version you had NBusiness projects with C#/VB partial classes with it which totally eliminated syntax hilighting and intellisense in those code files. That was very painful now E# files can exist in any regular .net project. Try creating a console application in C# (for example) and adding a new item. In your new items list you should see an &amp;quot;Entity&amp;quot;. If you don't you can just add a text file and use the .es file extension. Make sure the custom tool ESharpCodeGenerator is applied to your es file. To get the &amp;quot;Entity&amp;quot; to show up in your new items list you might have to run &amp;quot;devenv /rootSuffix exp /ranu /setup&amp;quot; from the visual studio command prompt. Getting those templates registered is sometimes a pain in the butt for the experimental hive.&lt;/li&gt;
    &lt;li&gt;Templates are sparse right now, that's what I have been working on. Creating templates is time consuming... but you can easily create your own. One new feature of v3 is that you can define templates in the same project that you declare your entities. Just add a reference to NBusiness.Templates then create a class that inherits from TemplateBase or CodeDomTemplatebase. Make sure you build once but then you should be able to use that template to do your code generation.&lt;/li&gt;
    &lt;li&gt;You can also use Spark or NVelocity to do your code generation, this is heavily under construction right now though. I have created a few &amp;quot;Custom Tools&amp;quot; that you can apply to .spark or .nv files to generate a class that inherits from TemplateBase for you. This is not very pluggable right now but if you want to use a different view engine I can help you figure out how and would be happy to accept patches for new view engines. So far Spark has been treating me pretty well... except that it only works with C# currently :( I've also been toying around with creating a XAML based view engine for generating code... it's pretty cool but might be more work that it's worth at this point.&lt;/li&gt;
    &lt;li&gt;The default business object framework needs lots of TLC. I've been creating templates targeting CSLA for now. I plan on having templates for both later on. Targeting new frameworks (NHibernate for example) will require a patch to allow you to detect validation rules etc. for intellisense. There is nothing stopping you from targetting them but it won't detect rules automatically (it turns out that is an incredibly hard problem).&lt;/li&gt;
    &lt;li&gt;Basically, most phases are in process right now. The core functionality &amp;quot;works&amp;quot; now it's just a matter of polishing up the VS integration piece and building templates and generally making the barrier to entry lower.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Tue, 05 Aug 2008 17:20:12 GMT</pubDate><guid isPermaLink="false">New Post: VS2008 Again 20080805052012P</guid></item><item><title>New Post: VS2008 Again</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=32788</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br&gt;
I have an installation of Visual Studio 2008 with the VS SDK.&amp;nbsp; The latest source from SVN (as of Aug. 2) compiles (almost) cleanly.&amp;nbsp; However, when trying the 'experimental hive' of Visual Studio I still can't get any projects having to do with E# projects.&amp;nbsp; Am I missing something, or is support for VS2008 not ready yet?&amp;nbsp; If not, how would you suggest I proceed in order to test drive NBusiness?&amp;nbsp; &lt;br&gt;
&lt;br&gt;
Thanks for your time and efforts!&lt;br&gt;
Yuval&lt;br&gt;
&lt;/div&gt;</description><author>tanden</author><pubDate>Sat, 02 Aug 2008 15:55:43 GMT</pubDate><guid isPermaLink="false">New Post: VS2008 Again 20080802035543P</guid></item><item><title>NEW POST: Visual Studio 2008 </title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=20558</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;&lt;div class="quote"&gt;
 &lt;br /&gt;I have seen documentation for setting up nBusiness in VS2005 but what about 2008?&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt; &lt;br /&gt;I hear you, I have lots of ideas for improving the plugin for VS2008 but at this point it doesnt work. There are a number of feature improvements to I have been coming up with. Meanwhile check out LINQ to SQL, not quite the same thing but so far I am pretty impressed. For some ideas of what is coming up next for NBusiness check out these items:&lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=Entity%20Inheritance"&gt;Entity Inheritance&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=Entity%20Models"&gt;Entity Models&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=Entity%20Attributes"&gt;Entity Attributes&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=Partial%20Entities"&gt;Partial Entities&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=Entity%20Reflection"&gt;Entity Reflection&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Also the next plugin will probably not be with &amp;quot;Entity Projects&amp;quot; but instead will be more similar to asp.net where you have .aspx pages in C#/VB web applications. That will be the biggest change, I'm hoping this will solve the issue related to missing c#/vb intellisense. It should also make the plugin much more simple and less error prone. &lt;br /&gt; &lt;br /&gt;Understanding that E# is more like a domain specific language, rather than an actual programming language helped me to come to some interesting ideas here.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Thu, 17 Jan 2008 03:05:36 GMT</pubDate><guid isPermaLink="false">NEW POST: Visual Studio 2008  20080117030536A</guid></item><item><title>NEW POST: Visual Studio 2008 </title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=20558</link><description>&lt;div class="wikidoc"&gt;
I have seen documentation for setting up nBusiness in VS2005 but what about 2008?&lt;br /&gt; &lt;br /&gt;Links to documentation, or comments would be great.  I really want to give this a try because I am not planning on going back to VS2005.&lt;br /&gt; &lt;br /&gt;Peace&lt;br /&gt;
&lt;/div&gt;</description><author>rclarkson</author><pubDate>Wed, 16 Jan 2008 14:36:39 GMT</pubDate><guid isPermaLink="false">NEW POST: Visual Studio 2008  20080116023639P</guid></item><item><title>NEW POST: lazy loading relationships scalability problems</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=20022</link><description>&lt;div class="wikidoc"&gt;
There is definitely some room for improvement in this system and I&amp;quot;ll put some good thought in it for v3.0 because it would be a good idea but there are currently two ways to handle this two improve performance, one is only sometimes applicable though.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Use a cached collection template&lt;/b&gt;&lt;br /&gt;There is a builtin template called CachedCollectionTemplate built into NBusiness that is useful for entities that rarely, if ever change. In this situation, if your categories were largely static then if you used this template it would not hit the database when loading the collection but would instead get it out of the cache. This of course is only applicable for collections that do not really change. &lt;br /&gt; &lt;br /&gt;&lt;b&gt;Use a custom fetch handler&lt;/b&gt;&lt;br /&gt;By default you will get your fetch methods generated for you and you will get all of your products loaded for you by default in the above situation but you can do a little but of custom code in the ProductCollection.cs custom code beside to get the desired effects with a better performance. &lt;br /&gt; &lt;br /&gt;So the real problem is that sometimes you want to get the categories with the products but sometimes you do not, the lazy loading is there because if you didn't have it you would end up fetch the entire database everytime you loaded your products but you can add custom code to tell the entity when to load certain other data. The solution I would reccommend is to first create a new factory method in the method name patterned as &lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=%5bEntity%5d"&gt;[Entity]&lt;/a&gt;Collection.FetchBy&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=%5bX%5d"&gt;[X]&lt;/a&gt;With&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=%5bRelationship%5d"&gt;[Relationship]&lt;/a&gt;();&lt;br /&gt; &lt;br /&gt;The &amp;quot;With&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=%5bRelationship%5d"&gt;[Relationship]&lt;/a&gt;&amp;quot; is the relationship implied to be lazy loaded. Or perhaps &amp;quot;For&lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=%5bUseCase%5d"&gt;[UseCase]&lt;/a&gt;&amp;quot; would be more appropriate? Anyway what this factory method would do woudl be to call the constructor with a new custom Criteria object. You will create that object and have it inherit from the FetchAllCriteria object inside of that collection. Something like:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
private class FetchAllWithCategoriesCriteria : FetchAllCriteria
{
   //...
}
 
public static ProductCollection FetchAllWithCategories()
{
     return new ProductCollection(new FetchAllWithCategoriesCriteria);
}
&lt;/pre&gt; &lt;br /&gt;Next you will need to add a handler to the Fetched event in the ProductCollection class and the code to do the forced loading:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
public override Initialize()
{
     this.Fetched += new EventHandler&amp;lt;FetchEventArgs&amp;gt;(Products_Fetched);
}
 
private void Products_Fetched(object sender, FetchEventArgs e)
{
     if(e.Criteria is FetchAllWithCategoriesCriteria)  //look for our custom criteria!
     {
          foreach(Product p in this)
          {
               p.LoadCategories(e.Connection); //Use the same connection to load the category objects.
          }
     }
}
&lt;/pre&gt; &lt;br /&gt;And finally all we need is the LoadCriteria method:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
private void LoadCategories(DbConnection cn)
{
     _Categories = CategoryCollection.FetchByProduct(cn, _productId);
}
&lt;/pre&gt; &lt;br /&gt;In this situation you will be making 1 query to fetch all of the products and then one more query for each product in your collection to fetch their applicable categories. You could imagine that in the LoadCategories method you could potentially call another &amp;quot;With&amp;quot; factory to cause another layer of implicit loading of a relationship of categories as well. I don't think there is anyway to end up with being able to get away with doing less queries for situations like this other than to perhaps create a stored procedure that uses a cursor to iterate through the selection of products and fetch their relatives then pass the DbCommand object around instead of the DbConnection so you can call NextResult() and load the categories that way. You might actually be able to do that right now by handling the Loaded method of the entity rather than the Fetched method. I cannot remember if not then that is a good feature request candidate for v3.0 (or 2.2).&lt;br /&gt; &lt;br /&gt;Does this make sense? It seems to be a fairly involved solution but if you understand the lifecycle of the entity it's not that bad and the amount of code really isn't that much either.&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Sun, 06 Jan 2008 19:49:30 GMT</pubDate><guid isPermaLink="false">NEW POST: lazy loading relationships scalability problems 20080106074930P</guid></item><item><title>NEW POST: lazy loading relationships scalability problems</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=20022</link><description>&lt;div class="wikidoc"&gt;
I was trying to speed up the Glitz site and found a fairly significant&lt;br /&gt;bottle neck (I think we had discussed this previously). Anyway, lazy loading&lt;br /&gt;the properties for objects in a collection ends up not being very scalable.&lt;br /&gt; &lt;br /&gt;Current:&lt;br /&gt; &lt;br /&gt;ProductCollection products = ProductCollection.FetchX(...);&lt;br /&gt; &lt;br /&gt;foreach (Product product in products)&lt;br /&gt;{&lt;br /&gt;       // doing something here that triggers a hit to the db&lt;br /&gt;       // can be very bad and a big perf hit&lt;br /&gt; &lt;br /&gt;       if (product.Categories.SomethingHere(...))&lt;br /&gt;       {&lt;br /&gt;               // ...&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Proposed (similar to what they do in LINQ to SQL):&lt;br /&gt; &lt;br /&gt;ProductCollection products = ProductCollection.FetchX(...,&lt;br /&gt;PreloadCategories);&lt;br /&gt; &lt;br /&gt;foreach (Product product in products)&lt;br /&gt;{&lt;br /&gt;       // categories have been already been loaded for each product&lt;br /&gt;       // in the current ProductCollection context...&lt;br /&gt; &lt;br /&gt;       if (product.Categories.SomethingHere(...))&lt;br /&gt;       {&lt;br /&gt;               // ....&lt;br /&gt;       }&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;Doing this, of course, is pretty complex.  I believe that LINQ to SQL allows&lt;br /&gt;you to take in a Func&amp;lt;T&amp;gt; to describe the items that need to be preloaded.&lt;br /&gt;That Func&amp;lt;T&amp;gt; then gets translated into SQL.  Crazy stuff!  But, with&lt;br /&gt;NBusiness, I think there are some things you can come up with in way of code&lt;br /&gt;generating the caching options with, perhaps, a Flags enum that is available&lt;br /&gt;in all Fetch operations.  This allows the caller to be in control of the&lt;br /&gt;preloading operation -- as having NBusiness try to infer that would probably&lt;br /&gt;be impossible.&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Sun, 06 Jan 2008 19:18:33 GMT</pubDate><guid isPermaLink="false">NEW POST: lazy loading relationships scalability problems 20080106071833P</guid></item><item><title>NEW POST: Creating entity Templates</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=16270</link><description>&lt;div class="wikidoc"&gt;
To create a new template you need to do a few things:&lt;br /&gt; &lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Create a class that implements NBusiness.Templates.ITemplate, or inherit from a class that implements ITemplate (NBusiness.Templates.TemplateBase for example)&lt;/li&gt;&lt;li&gt;Add a reference to the assembly that contains this class. For now you cannot put entity templates into the entity project itself (hopefully in the future this will be available).&lt;/li&gt;&lt;li&gt;Implement the generate method by returning one or more resource files. These files have a byte[] that represents the data for the file, for code files such as C#/VB you can take a string object and convert it into a byte[].&lt;/li&gt;&lt;li&gt;On your entity definition file (es) add a using that matches the namespace of your entity template. For example if the class is Example.Templates.MyExampleTemplate then add &amp;quot;using Example.Templates;&amp;quot; to your entity definition. This will cause your entity to show up with intellisense (hit ctrl + j to force intellisense). &lt;/li&gt;&lt;li&gt;Add your template to the entity for example: &amp;quot;entity ExampleEntity as EntityBase, MyExample&amp;quot; &lt;b&gt;Note: that the postfix 'Template' is missing on the name of the entity template, it is entirely optional&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;If you attach an instance of Visual Studio to the instance with the entity project when you build your project it should allow you to step into your custom template during build time. A few things you should know:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Your template will only be called once during build time, all entities defined by this template will be passed in as an argument. This allows you to create multiple files for each entity or 1 file for multiple entities.&lt;/li&gt;&lt;li&gt;The template specifies the names of the classes and files it will be generating. Try to stick with fairly unique naming standards.&lt;/li&gt;&lt;li&gt;Generated files (for now) are placed into the &lt;i&gt;$(ProjectDirectory)\obj\generated\&lt;/i&gt; folder. So if you name your file &lt;i&gt;&amp;quot;MyExample\\&amp;quot; + entity.Name + &amp;quot;.cs&amp;quot;&lt;/i&gt; then the file &lt;i&gt;$(ProjectDirectory)\obj\generated\MyExample\ExampleEntity.cs&amp;quot;&lt;/i&gt; will be created.&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;There is a work item related to creating project files for generated files, which should be available for version 3.0 but for now you are able to simply manually navigate to this folder to access the generated files.&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Wed, 10 Oct 2007 19:47:39 GMT</pubDate><guid isPermaLink="false">NEW POST: Creating entity Templates 20071010074739P</guid></item><item><title>NEW POST: Debugging NBusiness</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=16268</link><description>&lt;div class="wikidoc"&gt;
Ok you need to do a few things to setup:&lt;br /&gt; &lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Download the february 2007 Visual Studio SDK (v4), &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=51a5c65b-c020-4e08-8ac0-3eb9c06996f4" class="externalLink"&gt;http://www.microsoft.com/downloads/details.aspx?familyid=51a5c65b-c020-4e08-8ac0-3eb9c06996f4&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Get the latest version of the code from this project.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;Once you have done this open the solution file found in the branch you wish to work on called &lt;i&gt;NBusiness.VisualStudio.sln&lt;/i&gt;. Set the startup project as NBusiness.VisualStudio. This project has everything related to creating the visual studio plugin and such. You may find it easier to uninstall NBusiness using add/remove programs at this point, if you have it installed. This is not exactly necessary but it just adds some confusion sometimes. When you build NBusiness.VisualStudio it does a couple things you should be aware of, though don't worry about memorizing all of this it won't be necessary to know most of this but it is helpful to get the gist just in case.&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;NBusiness.MSBuild.dll is built and copied to C:\Program Files\MSBuild\NBusiness\... along with some other assemblies&lt;/li&gt;&lt;li&gt;NBusiness.targets is copied to this folder as well. Your entity projects will use this target file to build your entity projects. Everytime you build this project it will replace this file, which is why it's helpful to uninstall NBusiness before hand. This targets file will now point to your debug assemblies.&lt;/li&gt;&lt;li&gt;Zip files with entity project templates are copied to &lt;i&gt;'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ProjectTemplatesExp\'&lt;/i&gt; and ItemTemplatesExp.&lt;/li&gt;&lt;li&gt;Registry settings will be added under the key: &lt;a href="http://www.codeplex.com/NBusiness/Wiki/View.aspx?title=HKEY_LOCAL_MACHINE%5cSoftware%5cMicrosoft%5cVisualStudio%5c8.0Exp"&gt;HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\8.0Exp&lt;/a&gt; &lt;b&gt;Note: The 'Exp' at the end&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;The last two items here are done with special MSBuild tasks in the &lt;i&gt;NBusiness.VisualStudio.csproj&lt;/i&gt; file. So what this translates into roughly is that after building all of the projects you need to make one command line call to get everything setup in visual studio (you'll want to open the visual studio command prompt found in the visual studio start menu folder):&lt;br /&gt; &lt;br /&gt;&lt;i&gt;devenv /rootSuffix Exp /setup&lt;/i&gt;&lt;br /&gt; &lt;br /&gt;You will only need to do this once unless you are working on aspects of the visual studio plugin that require refreshing it in visual studio. Working on NBusiness codegeneration templates for example will not require calling this multiple times. This will set things up in visual studio so you can run NBusiness in &amp;quot;experimental mode&amp;quot;. Now you just have to either press the &amp;quot;start debugging&amp;quot; button in visual studio (starting the NBusiness.VisualStudio project will cause a new instance of VisualStudio running in experimental mode to pop up) or in case it complains about not being able to start up a class library (which is some sort of bug I'm not sure how to fix this and it seems sporadic) you can startup a new instance of visual studio manually in experimental mode with this command:&lt;br /&gt; &lt;br /&gt;&lt;i&gt;devenv /rootSuffix Exp&lt;/i&gt;&lt;br /&gt; &lt;br /&gt;There is a shortcut for this in the visual studio sdk folder in the start menu I believe. Now simply attach the instance of visual studio with NBusiness loaded to the process of the new instance and you're ready to go.&lt;br /&gt; &lt;br /&gt;To begin debugging something specific you can now go to File-&amp;gt;New-&amp;gt;Project and create a new entity project. Running this project will allow you to debug the NBusiness visual studio plugin. Building this project will allow you to debug NBusiness itself. To rebuild NBusiness you will need to close the experimental mode of Visual Studio, make your changes, build then start it up again. &lt;br /&gt; &lt;br /&gt;So here's a quick recap of what you need to do:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;download the sdk&lt;/li&gt;&lt;li&gt;get the latest version of the code&lt;/li&gt;&lt;li&gt;open NBusiness.VisualStudio.sln in the branch you will be working on&lt;/li&gt;&lt;li&gt;build the solution&lt;/li&gt;&lt;li&gt;run &lt;i&gt;devenv /rootSuffix Exp /setup&lt;/i&gt; via command prompt&lt;/li&gt;&lt;li&gt;start debugging&lt;/li&gt;&lt;ol&gt;
&lt;li&gt;or run &lt;i&gt;devenv /rootSuffix Exp&lt;/i&gt; via command prompt&lt;/li&gt;&lt;li&gt;attach to the new instance&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt; &lt;br /&gt;Good luck!&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Wed, 10 Oct 2007 18:59:34 GMT</pubDate><guid isPermaLink="false">NEW POST: Debugging NBusiness 20071010065934P</guid></item><item><title>NEW POST: NBusiness license</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=16033</link><description>&lt;div class="wikidoc"&gt;
Absolutely. The main section here says this:&lt;br /&gt; &lt;br /&gt;&lt;i&gt;&amp;quot;...each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.&amp;quot;&lt;/i&gt;&lt;br /&gt; &lt;br /&gt;The key there for you is &amp;quot;distribute its contribution&amp;quot;, which means you can distribute any NBusiness assembly with your applications. It also says:&lt;br /&gt; &lt;br /&gt;&lt;i&gt;&amp;quot;If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.&amp;quot;&lt;/i&gt;&lt;br /&gt; &lt;br /&gt;Which just means don't remove the &amp;copy; information and try to just rebrand it with something else so people think that you created it from scratch. There are some restrictions placed upon distributing the source code or derivative works of NBusiness with custom source code but other than that you should be free to use it in commercial projects as much as you want without it affecting the license of your commercial project.&lt;br /&gt; &lt;br /&gt;Furthermore all code generated by NBusiness is completely yours, this license doesn't even affect it in the slightest. NBusiness is a tool and the generated code is essentially code that you have authored and you contain complete ownership of all generated code. This license was selected because I wanted NBusiness to remain as open an free for everyone as possible while doing the bare minimum to protect NBusiness itself from being copywritten or patented out from under our feet. If you have a problem with any specific clause and it poses a conflict with what you need then feel free to post that here and we might be open to updating the license. We want this to be as open and as free as possible!&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Fri, 05 Oct 2007 14:02:02 GMT</pubDate><guid isPermaLink="false">NEW POST: NBusiness license 20071005020202P</guid></item><item><title>NEW POST: NBusiness license</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=16033</link><description>&lt;div class="wikidoc"&gt;
Hello,&lt;br /&gt;I really like NBusiness and I would like to use it in my commercial project to generate its data layer.&lt;br /&gt;I would like to ask, does the Microsoft Permissive License (Ms-PL) mentioned on http://www.codeplex.com/NBusiness/Project/License.aspx allow that?&lt;br /&gt;What requirements must my project fulfill to be able to use NBusiness generated code?&lt;br /&gt; &lt;br /&gt;Jan&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>PragueProgrammer</author><pubDate>Fri, 05 Oct 2007 09:36:26 GMT</pubDate><guid isPermaLink="false">NEW POST: NBusiness license 20071005093626A</guid></item><item><title>NEW POST: Questions from Chris Russi</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=14695</link><description>&lt;div class="wikidoc"&gt;
 &lt;br /&gt;&lt;b&gt;I am curious to know, since you work at Magenic, do you use CSLA in your day-to-day projects?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;We use CSLA quite a bit at Magenic, I have personally worked on several projects where we used CSLA and a few that didn't. Of course it helps to have Rocky personally available to answer CSLA questions as you're learning it :)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;I know you mentioned in your blog that you were prevented from using CSLA on godaddy because of the medium trust issue.  I have also run into that on a similar website for a web project I did once.&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;Actually I had done some work on a code generator at work that generates CSLA business objects and was about to begin working on a website for my own interests when I came across this limitation. It was a combination of needing a different solution and some of my own thoughts of how to do a better job with code generation that really brought me to create NBusiness. I have had lots of interesting conversations with some coworkers, including Rocky, about creating a traditional style DSL and finally decided to go for it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;Is the framework you came up with similar to CSLA?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;The default framework that comes with NBusiness is similar to CSLA in some ways but not so much in other ways. It turns out that the Medium Trust issue is a tough one to work around for some of the features of CSLA. For example, there is no Dataportal. This is a direct to database access layer. I suppose it would probably be possible to work in your own Dataportal type deal... but it's certainly not part of the default framework for now. Addtionally there is no N-level undo... there could be maybe but it's a little harder to do in medium trust.&lt;/li&gt;&lt;li&gt;Also the framework is just &lt;i&gt;one&lt;/i&gt; of the several components needed to get this whole thing to work so it doesn't have nearly the level of focus, maturity or number of features that CSLA has. Additionally, I could be a bit naieve about this point, but I don't think that there is formal support for persisting relationship objects in the business base classes, at least to the extent that I would like. So in that way I think it's maybe a little better, though you could certainly get nearly the exact same results with more work in your templates. But in general I would say the &amp;quot;feel&amp;quot; of working with the generated objects is very similar, for example you might create the following code to consume your NBusiness objects:&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;pre&gt;
    Customer c = Customer.CreateNew(); //Factory method for creating a new business object
    c.FirstName = &amp;quot;Justin&amp;quot;;
    c.LastName = &amp;quot;Chase&amp;quot;;
    Assert.AreEqual(0, c.BrokenRules.Count);
 
    c.Save();
    Assert.IsFalse(c.IsNew);    
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;You've mentioned in your blogs that it shouldn't be that hard to gen CSLA compliant objects from NBusiness; have you actually done this?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;No I haven't done this yet but it's a goal of mine. I have however done the templates for generating classes for the default framework and it would simply be a matter of generating code that targeted a different framework. I will say however, that in reality it probably wouldn't be &amp;quot;easy&amp;quot;. Rather, it would be easy to do it but it would &lt;i&gt;not&lt;/i&gt; be very easy to do it well. As we all know your business objects can get quite complicated and solving the problem in a generic way is even harder, however NBusiness was specifically designed with this in mind and therefore is absolutely possible.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;What are your thoughts about using N# instead of other ways to store metadata ( i.e. XML) now that you've had time to work with it?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;First off, you probably mean E# rather than N#.&lt;/li&gt;&lt;li&gt;Well I'm obviously biased but if you're willing to overlook that then I think it's absolutely great! I built an entire backend for my blog website in about 10 minutes, no joke, and hooking it up to the front end was very easy as well. This was an extremely simple example but just goes to show you useful it can be for small, medium trust websites at the very least. The jury is definitely still out though! In a lot of ways this project is really still just a hypothesis about what is the best way to express a domain specific language, for entities or anything else for that matter. The theory behind NBusiness is simply that it's most intuitive for coders to think and develop in code than in any other way. For example, I like the class designer that comes with VS 2005 but only for looking at relationships between classes that I have already created, I would never use it to actually author code. The why's behind this are probably beyond the scope of this post but I think most coders probably feel the same way.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;How hard was it to develop N#?&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;VERY. I've been working on it for over a year now (I think) and there is still much to be done!&lt;/li&gt;&lt;li&gt;To elaborate more I'll tell you that there are several components to NBusiness and each one was pretty hard. To give you an idea the various components there is the Compiler/Parser, the Templates, the business object framework, some web controls, MSBuild classes, Example website, visual studio integration and an installer. Each one had it's challenges but without a doubt the visual studio integration was the hardest. Quite possibly the hardest thing I've ever done and that was with virtually copying the IronPython example that came with the SDK. I would absolutely not reccomend ever creating a visual studio integration project unless you're either well financed or extremely sadistic (or you use the DSL tools). &lt;/li&gt;&lt;li&gt;Integrating with visual studio forced me to rewrite the entire parser I had created prior to that point. It was necessary in order to get the information I needed to enable intellisense. It's hard to forsee those types of things when you make a compiler for the first time, that's for sure. I should probably also mention that I'm no compiler expert, I mean it works but it's really the only one I've ever worked on. I've never even taken a compiler course in college so as far as I know it could be an extremely primitive an embarrassing compiler (ignorance is bliss)!&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;Thanks for making all the source available ... it's going to be fun checking it all out :-)&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;You're welcome!&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Wed, 05 Sep 2007 01:12:19 GMT</pubDate><guid isPermaLink="false">NEW POST: Questions from Chris Russi 20070905011219A</guid></item><item><title>NEW POST: Performance &amp; Reporting</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=14428</link><description>&lt;div class="wikidoc"&gt;
You got my questions EXACTLY right, and the answers were even more detailed than I expected, which is a pleasant suprise.&lt;br /&gt; &lt;br /&gt;I'm pleased that once NBusiness creates the database in it's &amp;quot;ROM&amp;quot; mode, that we are free to optimize SQL Server to our hearts content(within realistic limits of course).  However, your detail on the options was a refreshing concession to the realities we developers face working with different customers.&lt;br /&gt; &lt;br /&gt;Reporting seems to be a non issue, and I need as many options there as possible(webservices are generally our preference).&lt;br /&gt; &lt;br /&gt;Once I get some of these tasks off my plate, I will use NBusiness on a small project to get my feet wet.  Good luck, and thanks for dropping this GEM into the open source community.&lt;br /&gt; &lt;br /&gt;
&lt;/div&gt;</description><author>Dewey</author><pubDate>Thu, 30 Aug 2007 06:54:41 GMT</pubDate><guid isPermaLink="false">NEW POST: Performance &amp; Reporting 20070830065441A</guid></item><item><title>NEW POST: Performance &amp; Reporting</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=14428</link><description>&lt;div class="wikidoc"&gt;
Great questions, I'll try to answer them as best as possible. These are things that are sort of hard to answer in a getting started document so this is good to have it in a forum like this. The answers are, of course, more general and open to change as we see how people tend to want to use it.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Performance:&lt;/b&gt;&lt;br /&gt;1.) Reflection is definitely heavily used by the compiler. As you build your entities it looks in other assemblies quite a bit to verify that Types exist and to find out what are the Types of parameters and such. So far it seems that the build time, even with reflection, is pretty fast and with some optimization could be faster yet so I'm not really concerned about it at this point.&lt;br /&gt; &lt;br /&gt;But of course you're probably referring to &lt;i&gt;runtime reflection&lt;/i&gt; because at runtime is where you really want the performance and I'm glad to say that there is virtually no runtime reflection going on at all, believe it or not. There is the occasional &amp;quot;is&amp;quot; statement or the code generated equivalent but this is pretty minor and very reasonable. There is a &amp;quot;Scaffolding&amp;quot; control that comes with the library which uses quite a bit of public reflection to do various tasks but this control is completely optional and not meant to be public facing necessarily, it is meant to be plopped into an admin portion of a site so data can be accessed fairly easily. Anyway, the reason why the reflection can be kept to a minimum is because of code generation. Typically with hand written code when you want to say, call a method and pass in each property on an object to that method then you will end up using reflection to do this. Your code might look like this:&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Alternative 1&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;
foreach(PropertyInfo p in GetType().GetProperties())
{
    DoSomething(p.GetValue(this, null));
}
&lt;/pre&gt; &lt;br /&gt;&lt;b&gt;Alternative 2&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;
DoSomething(Property1);
DoSomething(Property2);
DoSomething(Property3);
&lt;/pre&gt; &lt;br /&gt;Of course alternative 1 uses reflection so it's performance implications are suspect but it is FAR more maintainable and less error prone since, adding or removing or renaming a property will require alternative 2 to be altered as well. But of course this whole problem goes away when code generation comes into the picture! So in the case of NBusiness it uses alternative 2 as often as possible in place of reflection since it is &amp;quot;re-written&amp;quot; every time you build it anyway. So there is virtually no runtime reflection. &lt;br /&gt; &lt;br /&gt;Also it's worth noting that NBusiness is a template driven code generator and that the business objects that it generates by default are merely the &lt;i&gt;default&lt;/i&gt; templates that will get people going but there is nothing stopping you from code generating your own business objects for a more popular 3rd party business object / data access framework (CSLA, NHibernate, etc.). I would love to have more templates available, so that people have that that flexibility right away but 1 set is enough to keep me busy full time for now. Ideally this will grow as the community grows.&lt;br /&gt; &lt;br /&gt;2.) The system I have gone with for NBusiness is to create the database schema based on the entities (or ROM, relational object mapping) vs. creating the entities based on the database shcema (or ORM, object relational mapping). BUT there is nothing forcing you to do this, this is merely a way to enable users to rapidly develop new applications. There are 3 possible scenarios I'll outline and I'll tell you how I envision them to work in the real world. Also, I should note that there is a &lt;a href="http://www.codeplex.com/NBusiness/WorkItem/View.aspx?WorkItemId=10447"&gt;work item&lt;/a&gt; for the next version posted about creating a way to generate entities based on an existing database but it has not been completed yet. To hear some more of my thoughts on this subject you can read &lt;a href="http://justnbusiness.blogspot.com/2007/06/nearing-v20-release.html" class="externalLink"&gt;this blog&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Database Options&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;You can use the built-in script template and scheme updater to build your database for you based on your entity schema.&lt;/li&gt;
&lt;/ol&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Pro:&lt;/b&gt; Very useful for rapid development.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Con:&lt;/b&gt; Not exactly realistic in a serious production environment.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Reality:&lt;/b&gt; In reality it's great for small and medium projects where you're starting from scratch. If you're building a version 2 of an NBusiness project you will be able to just continue to use the system but when it comes to deploying the changes to your production database you will need to either use a tool (Red Gates SQL compare for example) or manually write a script to merge changes into your database without losing any data.&lt;/li&gt;&lt;li&gt;After you have settled on your entities there is nothing stopping you from going into the database and optimizing it with indexes and whatnot. All of the default entities interact with the database through stored procedures and there is nothing stopping you from altering those stored procedures to be more effiecient. In that case you might end up with two scripts, one generated that gets you 90% of the way there then another that is handwritten with your various customizations and they are both deployed in turn to the production server.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;ol&gt;
&lt;li&gt;Completely ignore the generated scripts and schema updater&lt;/li&gt;
&lt;/ol&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Pro:&lt;/b&gt; Complete control over your database.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Con:&lt;/b&gt; Lots of manual work, not very rapid.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Reality:&lt;/b&gt; For large projects where the developer most likely does not have control over the database anyway this will probably be the route that needs to be taken. In this case NBusiness default entities simply require certain stored procedures with specific inputs and outputs be created, a developer could manually create these stored procedures that end up interacting with any sort of underlying database schema. In this way your entities could represent a fraction of the scope of the entire database and they could represent a completely different object model. It is the responsibility of the developer to create stored procedures as the bridge between the objects and the relational model.&lt;/li&gt;&lt;li&gt;Also, I'd like to say that I have the ability to create a dynamic sql solution foremost in my mind as well. For situations where it is not possible to even create stored procedures or for people who really don't want to use them, this will be essential. This is not currently a feature and is going to be tricky but it is on the horizon. I also plan to study the new .net Entity framework stuff to see how the two might be able to live in harmony. For now it seems like it might be possible to rely on the entity framework for data-access while still using NBusiness for &amp;quot;Business Objects&amp;quot; (the differences of which are beyond the scope of this discussion probably).&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;&lt;ol&gt;
&lt;li&gt;Custom templates&lt;/li&gt;
&lt;/ol&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Pro:&lt;/b&gt; Even more control over how the entities interact with the database.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Con:&lt;/b&gt; Even more work. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Reality:&lt;/b&gt; In reality people probably will end up working on their own templates from time to time, NBusiness has a unique ( I think?) system of &lt;i&gt;templating&lt;/i&gt;. It is an object oriented template system and it is possible to inherit your templates from existing templates and override key methods to selectively alter certain output as well as a &amp;quot;Dependency&amp;quot; mechanism to customize code created in dependent templates. I can go into this in more detail if needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;b&gt;Reporting:&lt;/b&gt;&lt;br /&gt;Three solutions come to mind here though I'm not 100% on your question I must admit. Also this is assuming that you use the auto-generated database features. You could (as outlined above) use existing databases if you so choose and do reporting as you always have.&lt;br /&gt; &lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Continue to write reports that interact with the database directly, if you release updates later on you'll probably have to alter your reports as well. You may find that the database that is generated from NBusiness is actually pretty simple and easy to report on.&lt;/li&gt;&lt;li&gt;If it's possible for your preferred method of reporting to use web services as a datasource you could easily expose your entities through a webservice and report using that. There is a script called &amp;quot;EntityInfoTemplate&amp;quot; that was specifically created with webservices in mind because they are, essentially, XML serializable versions of their corresponding entities. This script is also a good example of template Dependencies, because, for example, an entity that has both the EntityInfoTemplate and the EntityBaseCollectionTemplate will have a method &amp;quot;GetInfoArray()&amp;quot; on the generated collection. You can use these info objects to pass out of a web service and use them to load entites from incoming method calls.&lt;/li&gt;&lt;li&gt;A standard webform using databinding to bind to your objects and display the data you are looking for. Take a look at the EntityDataSource control found in the NBusiness.Data.Web namespace.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;Thanks for the questions! It helps me to put words to things and hopefully it will help answer other peoples questions as they come up. And of course I love feedback and the direction of NBusiness can still be altered as discussions about these things come up, feel free to let loose with opinions and ideas.&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Wed, 29 Aug 2007 14:22:42 GMT</pubDate><guid isPermaLink="false">NEW POST: Performance &amp; Reporting 20070829022242P</guid></item><item><title>NEW POST: Performance &amp; Reporting</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=14428</link><description>&lt;div class="wikidoc"&gt;
First let me say that this is something I've been looking for, and I think you are on solid ground technically.  However, I do have some questions that I've had to deal with using my own ORM and others.  I apologize in advance if you've answered these question, but I got so excited by what you've produced here that I didn't read too deeply in this pass ( real work interfers :( )&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Performance&lt;/b&gt;:  &lt;br /&gt;1.  There are two areas where performance could be affected.  The amount and ways that refelection is used.  While this is not a big concern, I ask about it for completeness.&lt;br /&gt;2.  Database Performance is the other concern since the user is no longer in complete control.  In the real world, optimizing the database is a big concern once the project starts to have many users.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Reporting&lt;/b&gt;:&lt;br /&gt;I almost never use ORM to do reporting, but with the ORM model, I still have an intimate connection with the database.  How does this work with NBusiness, especially since the database is created for you.&lt;br /&gt;
&lt;/div&gt;</description><author>Dewey</author><pubDate>Tue, 28 Aug 2007 18:22:15 GMT</pubDate><guid isPermaLink="false">NEW POST: Performance &amp; Reporting 20070828062215P</guid></item><item><title>NEW POST: Dynamic access and authorization</title><link>http://www.codeplex.com/NBusiness/Thread/View.aspx?ThreadId=13511</link><description>&lt;div class="wikidoc"&gt;
Actually I was just talking about this with someone else yesterday. We were talking about a slightly different problem though which is to have dynamic authorization based on the values of the entity. For example if you had a State field, you might want to say &amp;quot;When the entity is in this state only allow these users to update it&amp;quot;. Which is dynamic beyond simply roles and users... So just as I was reading your post here I had an idea of how to do this.&lt;br /&gt; &lt;br /&gt;You could have a system sort of like the validation rules, where you have the ability to create custom validation rules and pick which one to use for each validation case. In your case what we might end up with is something like &amp;quot;RoleAuthorizationRule&amp;quot; and &amp;quot;UserAuthorizationRule&amp;quot; classes and in the case I outlined above you might need a &amp;quot;ValueRoleAuthorizationRule&amp;quot; class. Your E# syntax would look like this:&lt;br /&gt; &lt;br /&gt;&lt;i&gt;Example&lt;/i&gt;&lt;br /&gt;&lt;pre&gt;
using NBusiness.Data.Authorization;
//...
authorize allow fetch role &amp;quot;*&amp;quot;;
authorize allow fetch user &amp;quot;justinc&amp;quot;;
 
authorize allow update valuerole State, 1, &amp;quot;Admin&amp;quot;;
authorize allow update valuerole State, 2, &amp;quot;Users&amp;quot;;
&lt;/pre&gt; &lt;br /&gt;The third parameter would be the authorization rule to use, the following parameters would be the values to submit to authorization rule as arguments. How does this sound? NBusiness would come with the most common authorization rules but it would be extensible to any developer by simply adding a reference to an assembly (or creating one in your entity library) and adding the correct &amp;quot;using&amp;quot; statement above the entity that needs the rule.&lt;br /&gt; &lt;br /&gt;What do you think about having ( ) around the parameters? Also should those rules be role or Role, ValueRole or valuerole? I'm debating against the all lowercase vs. the Pascal case because I wanted it to seem more like a keyword than an object... but perhaps it would make more sense as an object and Pascal casing.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
authorize allow fetch role(&amp;quot;*&amp;quot;);
authorize allow fetch valuerole(State, 1, &amp;quot;Administrators&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;Either way I would want to trim down the name similar to the way Attribute names are trimmed down in C#.&lt;br /&gt;
&lt;/div&gt;</description><author>justinc</author><pubDate>Thu, 09 Aug 2007 17:22:24 GMT</pubDate><guid isPermaLink="false">NEW POST: Dynamic access and authorization 20070809052224P</guid></item></channel></rss>