This project is read-only.

Adding Service Calls to a NO Web Application, thoughts?

Sep 18, 2012 at 5:11 PM

Hi All,

Thinking ahead I will need to add Service calls to my NO Web App. Some internal and some external ie:

1) Take XML, Create Word DOC using 3rd party component, return Word DOC to App then Return Word DOC to browser via controller (Internal).

2) Take data from Model, Create SMS message, push to external SMS Service, Get SMS success/failure response (External).

Any thoughts on the best way of integrating this type of funcationality into a NO MVC application.

Many thanks,

Ed

 

Sep 18, 2012 at 5:20 PM


On 18 September 2012 17:11, ESSB <notifications@codeplex.com> wrote:

From: ESSB

Hi All,

Thinking ahead I will need to add Service calls to my NO Web App. Some internal and some external ie:

1) Take XML, Create Word DOC using 3rd party component, return Word DOC to App then Return Word DOC to browser via controller (Internal).

2) Take data from Model, Create SMS message, push to external SMS Service, Get SMS success/failure response (External).

Any thoughts on the best way of integrating this type of funcationality into a NO MVC application.


The recommended pattern is to write a system service for each, and register in RunWeb. They will then be injected into any entity that declares that service as a property.

For (1), look into the OpenXml API, is a good fit for "mail merging" data from an entity into a pre-existing .docx template. Then use a derived property of type FileAttachment to view the doc in the browser. Have a domain object called "DocxCommunication"; the .docx bytes are a value of this.

For (2), can't help you particularly, other than presumably there are a bunch of SMS services you can integrate with in your SmsServiceImpl. Again, I'd have an SmsCommunication to represent this; you could then extract an ICommunication supertype, each referencing an ICommunicableParty.

HTH
Dan

Many thanks,

Ed

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Sep 18, 2012 at 5:50 PM

Dan,

Thanks for this. I think I need to read more about NO as your suggestions are a little over my head although I understand where you are going with this. May have a few questions shortly :)

BTW, any restrictions of using XML data in NO, since I will be storing the DOCX components as XML. In the past I have used XSLT at runtime to merge and then feed the resultant XML to the DOC/DOCX converter which can add extra stuff like paging, TOCs etc. We did have a look at the Word Templating engine, but decided that it was a security headache since this is for an internet application and Word Macros run client side.

Thanks,

Ed

Sep 18, 2012 at 5:59 PM

On 18 September 2012 17:51, ESSB <notifications@codeplex.com> wrote:

BTW, any restrictions of using XML data in NO,

None that I'm aware of... the xml data is just a (rather large) value of an entity.

Dan