Single Page Application with AngularJS - Your advice on certain considerations

318 views
Skip to first unread message

softwa...@gmail.com

unread,
May 15, 2013, 10:27:44 AM5/15/13
to ang...@googlegroups.com
Hello!

After playing with AngularJS for a few weeks my boss gave me a project today.

My task is this:
A single page application must access a measurement device via FTP in the local network. It should list all available ZIP files on that device.
After selecting a file ny user the web page must send it to an existing webservice in the WAN. Afterwards the web service returns generated PDF files and XML data to be displayed within the web page.


I think AngularJS is a good choice for that because it offers the separation of:

Model - the data that is sent to and fetched from webservice
View - HTML of that single page application
Controller - the business logic for data transfer in and out


My heavy concern is about fetching the files from FTP server and passing them to the web service.

I do not know whether that is a common thing. Is there any AngularJS support for that? Or any template code for doing that?
Does anybody have experience with such things?

Best regards and thanks in advance!

Grant Rettke

unread,
May 15, 2013, 10:59:57 AM5/15/13
to ang...@googlegroups.com
The web service itself is already on the back-end, add a call to tell
the service how to get the file (ftp url for example) and let it
obtain it itself rather than mucking around with the UI side.
> --
> You received this message because you are subscribed to the Google Groups
> "AngularJS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to angular+u...@googlegroups.com.
> To post to this group, send email to ang...@googlegroups.com.
> Visit this group at http://groups.google.com/group/angular?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Grant Rettke | ACM, AMA, COG, IEEE
gre...@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

ThomasBurleson

unread,
May 15, 2013, 11:14:52 AM5/15/13
to ang...@googlegroups.com
The secret to AngularJS (and H5 apps in general) is too realize that your app is a thin-client application that communicates to the middle-tier [ aka web services ]. 

Your middle tier should provides an API for the heavy-work functionality (for example):

1) GetListOfZipFiles() : Array
2) SendZipFile( zipID ) : XML (which contains urls to PDFs)

Now the H5 app simply creates a client-side service facade for these APIs and renders HTML for the UX you want.
  • Loading the application calls (1) on your service facade
  • User selections trigger (2) on  service API.

- ThomasB
Reply all
Reply to author
Forward
Message has been deleted
0 new messages