Wishlist

Coordinator
Mar 22, 2011 at 8:05 PM

All wishes of future features and changes, here thanks!

/Tony

Coordinator
Mar 22, 2011 at 8:07 PM
Edited Mar 23, 2011 at 7:35 PM

I've got some already!

- More documentation and examples
- Unit testing
- Entity generation tool (Like SPMetal but with GUI)

Mar 28, 2011 at 3:07 PM

Can you please explain in few words how you see an implementation of the following scenario:

Web Scoped feature:

1) Create list "A"

2) Create list "B" with lookup "F" to list "A"

(field lookup list changes per web)

Did you plan to add some example/examples to address lists relationships?

Thanks.

Mar 28, 2011 at 3:34 PM

Can you please suggest how to declare list instance with safe lookup field (for tree structure)?

Coordinator
Mar 28, 2011 at 9:43 PM

I dont know if this helps, but I have added some how-tos in the Core documentation http://spgenesis.codeplex.com/wikipage?title=Fields&referringTitle=Core

The idea is to create a field based on a lookup list that is a managed list instance (declared with the SPGENListInstance base class and attribute).

Pleas tell me if this helped you out?

Regards,
Tony

Mar 29, 2011 at 9:49 AM

Thanks. I think it will help to others.

But I have few questions for more specific situation.

What I need is ability to create list with single content type, what contains self lookup field (lookup to the same list that contains field),

and ability to have such list instance on more than one web in site collection.

Scenario 1:

1) Declare managed field "F" where LookupList="Self"

Q: If I'm not mistaking current release doesn't have support for it, but it's valid syntax in CAML field definition ( List="Self", ex: RelatedIssues field, discussion board fields and other )?

2) Declare managed content type "CT" with link to "F"

3) Declare managed list instance "LI" with binding of "CT"

4) Provision "F", "CT" to site

5) Provision "LI" on any web.

Scenario 2:

1) Declare managed content type "CT" WITHOUT link to "F"

2) Declare managed list instance "LI" with binding of "CT" (add "F" to "LI" to all content types in OnProvisionFinalized ???)

3) Declare managed field "F" where LookupList =typeof(<"LI">) (or LookupList="Lists/LI" ???)

4) Provision "CT" to site

5) Provision "LI" on any web.

Q: Since "F" added to "CT" only in lists should "CT" be declared with SPGENProvisioningMode.ExclusiveAdd mode?

Q: What exact should I do in OnProvisionFinalized ??? Should I work with native SP API, or I have an option to use somehow my managed SPGEN declarations?

Q: Maybe you may suggest something else for such requirement?

Many Thanks.

Mar 29, 2011 at 3:44 PM

Tony,

I suggest default access to instance should be changed to GetByUrl since it's more safe and consistent way to access list,

or at least it should be configurable.

1) Sometimes list title may be changed by end user

2) I'm not sure access to list should rely on resources

public class SPGENListInstance<TListInstance> : SPGENListInstanceBase        where TListInstance : SPGENListInstance<TListInstance>, new()

{

.... 

public override SPList GetList(SPWeb web)        {            return GetInstanceInternal(web, false, true);        } // second param causes resource retrieval routine and call SPWeb.TryGetByTitle

....

}

What do you think?

Coordinator
Mar 29, 2011 at 5:14 PM
robertovich wrote:

Tony,

I suggest default access to instance should be changed to GetByUrl since it's more safe and consistent way to access list,

or at least it should be configurable.

1) Sometimes list title may be changed by end user

2) I'm not sure access to list should rely on resources

public class SPGENListInstance<TListInstance> : SPGENListInstanceBase        where TListInstance : SPGENListInstance<TListInstance>, new()

{

.... 

public override SPList GetList(SPWeb web)        {            return GetInstanceInternal(web, false, true);        } // second param causes resource retrieval routine and call SPWeb.TryGetByTitle

....

}

What do you think?


Thank you for the feedback! I have created an issue of this in the Issues section. The discusion will continue there.

/Tony

Apr 4, 2011 at 11:51 AM

Hi Tony.

Did you plan to add some kind of support to Mappers to retrieve data from DataTable > DataRow structure and not just from SPList > SPListItem.

Sometimes it becomes to essential requirement in solutions based on cross-site queries (using CrossListQueryInfo class).

Thanks.

Coordinator
Apr 4, 2011 at 12:02 PM

yes,

I'm about to test the new version wich will suport site-queries based upon the DataRow instead of SPListItem. I think it will be ready by the end of this week.

The SPGENEntityManager GetEntities methods will be extended to support this new features.

/Tony

Apr 11, 2011 at 12:29 PM

Any hope for XML comments? :)

May 30, 2011 at 8:36 AM

Since SP OM does not supports activating features with properties,

it would be nice to add such support to SPGEN.

General idea:

http://www.sharemuch.com/2010/12/02/activating-sharepoint-2010-features-with-properties/

What do you think about and when you plan next release with site data query support?

Coordinator
May 31, 2011 at 6:57 AM

Although the activation solution is nice it uses access to internal members of the SP OM which is not supported in general. At this moment at have decided to not have unsafe or unsupported code in the framework. But that could change if the function is very important.

The new version (1.2.0) is a month late now due to too much work but will be realeased soon. It will have support for site queris, bug fiexes etc. It is currently under testing.

/Tony

May 31, 2011 at 12:48 PM
Edited May 31, 2011 at 12:52 PM

Ok.

I have some OOP related question.

What we have:

1) all spgen element classes are generic classes

2) all spgen element classes have their own not derived public  members ( Instance, Provision etc)

Problem:

I can not extend spgen classes with extension methods since those not supported for generics,

and I can't use polymorphism by the same reason.

Sugestion:

May be I just missing something, but I feel a need in extending base classes with public abstract methods or some additional layer of Interfaces to do the following coding possible:

void ProvisionField( ISPGENField field, SPWeb web ) 

{

Logger.TraceToDeveloper( "Provisioning field: " + field.InternalName);

field.Provision(web);

}

or

 static void MyProvision(this ISPGENField field, SPWeb web ) 

{

Logger.TraceToDeveloper( "Provisioning field: " + field.InternalName);

field.Provision(web);

}

Your thoughts?

Sep 13, 2011 at 10:08 AM

Hello,

Is there any way to use an Asset Picker URL field?

Coordinator
Sep 14, 2011 at 8:10 AM

Hi,

It is not natively supported through the Genesis API but it should be no problem declaring it as a Custom type if you want it as a SPGENField element.

In entities you'll have to write an own field to property adapter to convert field values to and from the entity properties.

I'll put this into the wish list.

/Tony