in

Community

Take part in the community surrounding CodeBreeze and other products from SteelBlue Solutions.
Latest post 11-07-2008 2:10 AM by Starbuck. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 08-07-2008 7:38 PM

    Could use some feedback on the CSLA 3.5 Templates

    If anyone uses them, I would appreciate any comments.

    Miguel

  • 08-11-2008 5:59 PM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    Hi,

    I would like to use them, but I have no experience yet with CodeBreeze.

    I'm desperately looking for a good and solid CSLA.Net generator. I'll make the UI myself, but I need support for multiple databases, transactions, Win and WebForms and WebServices. I have to rewrite our ERP application with more than 300 tables. Is CodeBreeze up to the job with CSLA.Net 3.5 templates?

    Greetings,

    Sigurd

  • 08-16-2008 12:40 PM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    CodeBreeze is as solid as you're going to find with a code-generator.  There's no comparison on the market.  If the code I produce in my templates are not enough, you can always make copies and modify them to your own needs and style; which is what I expect most people to do anyway.  I don't thing anyone can expect out-of-the-box code templates to do "everything" for "everyone".  CodeBreeze's Target-Tags model is used throughout the code templates to achieve parent-child relationships and can be used for just about anything else that is "entity-specific".  CodeBreeze 1.1 will bring even more power to the punch and will be available as a free upgrade for all current CodeBreeze users.

    Episode 77 on www.dnrtv.com covers an hours worth of a CodeBreeze demo.

     

  • 08-25-2008 1:54 PM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    Hi,

     my name is Alex and I am working on a big project and I require the Linq CSLA 3.5 template. I have read that you have finished the Codebreeze 1.1, where can I download it???

    my email is: adoan@la-weightloss.com

    -thanks
      Alex.

  • 08-27-2008 11:40 PM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    I'm not sure where you read that.  CodeBreeze 1.1 has not been released yet.  When it is, the download location will be the same as 1.0, steelbluesolutions.com.  Also there is no 'Linq CSLA 3.5 template' per-say.

    The current CodeBreeze 1.0 comes with CSLA 3.5 templates but they do not use Linq.  The only place you're going to use Linq is going to be as the data access layer using the Linq-to-SQL implementation.  The CodeBreeze templates use another DAL component that is also provided for you in the downloaded zip.  I'm not a fan at all of Linq-to-SQL and the code templates that CodeBreeze ships witih are based on the CSLA code that myself and my team have used on CSLA projects.  It wouldn't take much effort for you to make copies of them and change them to use Linq, but we have no plans on doing that for any release.  It really is the point of a template-driven code generator that you make your own templates for your own kind of code.  In fact that's what most of our customers have done - used our templates as starting points.

  • 09-16-2008 8:20 AM In reply to

    • Burim
    • Top 10 Contributor
    • Joined on 09-16-2008
    • Posts 1

    Re: Could use some feedback on the CSLA 3.5 Templates

    Might be a bit of a late reply but I only had time now to write it.

    CSLA 3.5 Templates are generally fine, however I came accross some issues that are listed below:

    When using DAL the generated code on the Data Portal Insert, Update operations is returning a DataReader from dal under the using block. This causes the children update to fail when using the Field Manager because child objects are returning data readers as well under the same connection, and we already have an opened data reader. I just inserted a reader.Close() after the parent insert/update block and it worked fine.

    I will come back with two more issues I encountered one has to do with deletion of child objects, somehow I am hitting the MSDTC and that is not what I want but currently I did not have much time to explore it, and the other one has to do with the child methods on the root object that would enable it to act as a child of another object, I am having issues with inserts, updates here as my objects are not being correctly recognized by the framework, somehow all of them are treated as children and I get some exception saying operation not allowed on child objects.

    Regards,

    Burim

  • 10-10-2008 4:38 AM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    Overall I think they are great!  So far from my evaluation I think CodeBreeze is great! (I'm using build 89 of CodeBreeze.)  Not sure what kind of feedback you're looking for here, but there seems to be a bug in the DataPortal_Create; This is best explained by pasting the code: There is a property registration for the primary key of the class as follows:

     

     

     

    Protected

     

    Shared budgetIDProperty As PropertyInfo(Of Int32) = _

    RegisterProperty(Of Int32)( GetType(Budget), New PropertyInfo(Of Int32)("BudgetID"))

    But the DataPortal_Create is trying to load the above int32 property with a GUID:

     

     

    Protected

     

    Overrides Sub DataPortal_Create()

    LoadProperty(

    Of Int32)(budgetIDProperty, Guid.NewGuid())

    ValidationRules.CheckRules()

     

     

    End Sub

    This results in a "GUID cannot be converted to Int" compile-time error.  (I have also generated code using the CSLA2005 templates and I see this same error happens there though.)

     

    Then there seems to be a problem in the DataPortal_Delete on a business entity that was generated off a table that has a multi-column primary key:  It calls the correct dal.Delete method, but it is using a criteria of type SingleCriteria, and passing this criteria's value to the dal.Delete method.  Meanwhile, the stored procedure (and subsequent wrapper) for the delete was correctly generated to require a parameter for each column making up the primary key.  Herewith the generated DataPortal_Delete:

     

     

     

     

     

    <Transactional(TransactionalTypes.TransactionScope)> _

     

    Protected Overloads Sub DataPortal_Delete(ByVal criteria As SingleCriteria(Of XActionSplit,Int32))

     

     

    Using dal As New DataAccess(False)

     

     

    Using reader As

    SafeDataReader = dal.XActionSplitDelete(criteria.Value) '[compile-time error here indicating that more parameters should be added here]

     

     

    End Using

     

     

    End Using

     

     

    End Sub

    And herewith the correctly-generated delete wrapper in the dal:

     

     

     

     

     

    Public

     

    Function XActionSplitDelete(ByVal p_XActionID As Int32, ByVal p_CategoryID As Int32) As SafeDataReader

    Dim parameters As IDataParameter() = _

    { _

     

    DirectCast(GetParameter("@p_XActionID", p_XActionID), IDataParameter), _

     

     

    DirectCast(GetParameter("@p_CategoryID", p_CategoryID), IDataParameter) _

    }

     

     

    Return GetReader("XActionSplitDelete", CommandType.StoredProcedure, parameters)

     

     

    End Function

  • 11-05-2008 1:16 AM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    Miguel, I've written my own very limited code generator but was looking for "a better way". I've spent the last couple weeks looking at architecture frameworks, spent time looking at CSLA and was really impressed. From there I was looking around for CSLA-aware code generators - particularly with current templates. That led me here. So I've downloaded the latest CSLA 3.6.0 (Beta 2a) and would like to run that with an eval of CodeBreeze.

    Another key factor that has me interested in CB is that we work with non-relational databases, so standard providers are useless unless I "normalize" everything into relational structures. The DAL in CSLA is completely DBMS agnostic and I need a code generation tool that's equally flexible.  I saw the DNRTV video and I understand that I should be able to write my own provider to give CB what it needs to do what it does.  To me this is very attractive.

    So to answer your question about feedback - I haven't tried CSLA or CodeBreeze yet but I would like to work on this aggressively. My goal is to assemble "best of class" tools to offer to a wider audiece of companies that work with the same products I do.  The goal of all of this is to facilitate the path from legacy apps to attractive UI's by extracting key info from the existing databases and generating quality business entities that can be used as data sources for thick and thin clients.

    I'd appreciate anything that you can do to help get me on the fast-track for myself and to see if this can be a wider offering. I'll work with any latest beta - what I don't want to do is struggle with old code or templates to get around problems that have already been solved.  And of course I will do my best to beat up your templates on whatever version of CSLA that the templates support.  Let the fun begin...

  • 11-07-2008 2:10 AM In reply to

    Re: Could use some feedback on the CSLA 3.5 Templates

    I'm running the CSLA templates against the AdventureWorksLT database so anyone can verify these issues found with the Customer table.

    Item 1:

    shawndewet:
    Shared budgetIDProperty As PropertyInfo(Of Int32) = _
    RegisterProperty(Of Int32)( GetType(Budget), New PropertyInfo(Of Int32)("BudgetID"))

    But the DataPortal_Create is trying to load the above int32 property with a GUID:

    Protected Overrides Sub DataPortal_Create()
       LoadProperty(Of Int32)(budgetIDProperty, Guid.NewGuid())
       ValidationRules.CheckRules()
    End Sub

    This results in a "GUID cannot be converted to Int" compile-time error.  (I have also generated code using the CSLA2005 templates and I see this same error happens there though.)

    This occurs because BusinessBase.LoadProperty has this signature:
    protected void LoadProperty<P>(PropertyInfo<P> propertyInfo, P newValue);

    It's expecting an Int32. The code that causes this is in BusinessObjectBaseCS.ctt (region Data access):

    LoadProperty<<%=DataMapping(idField.DataType)%>>(<%=idField.CamelMappedName%>Property, Guid.NewGuid());

    I think the solution depends on the individual.

    Item 2: The default C# datatype mapping for "bit" is "bool" but the SafeDataReader method is GetBoolean(string name), so SqlDataTypeMappings.xml should be modified at
    <DataTypeMappings>
      <CSharp>
        <DataTypeMapping>
          <DatabaseType>bit</DatabaseType>
            <LanguageType>bool</LanguageType>
    Change to:
            <LanguageType>boolean</LanguageType>
    You could change the individual project setting, but the map itself is wrong if you're working with CSLA so I think it's better to change the XML.

    Item 3: DataAccess class needs to implement IDisposable because it's used in "using" blocks.

    Item 4: BusinessObjectBase calls crud methods on DataAccess but they weren't implemented. I haven't looked too deep here, maybe I should have done something to call sprocs.

    Item 5: Where is CSLAEx ?

Page 1 of 1 (9 items)
2008 - All rights reserved
Powered by Community Server (Commercial Edition), by Telligent Systems