User Profile & Activity

Domingo Fugaban Member
Page
of 6

Hi Yudi,


Well, the reason why we're asking is because we are trying to construct our view models with parameters, instead of using property injections. Since we are using old school WCF to retrieve data from the server, we are implementing it this way while we haven't updated to your Enterprise architecture yet, because we started from Crosslight v1. In which it was easier to reference a WCF web service to just grab data by using operation contracts. Or we thought it was easier, and now we are running into problems.


public class ExpenseListViewModel : EditableListViewModelBase<ExpenseItem>{
    private readonly IExpenseRepository _expenseRepository;

    public ExpenseListViewModel(IExpenseRepository expenseRepository)
    {
        this._expenseRepository = expenseRepository;
    }

    ...
}

 

Now, if this implementation is not a good practice based on Crosslight's architecture, please let us know how we can implement CRUD operations on remote data without using WebAPI. We already have operation contracts within the WCF web service based on CRUD operations (e.g. GetExpenseByID, GetAllExpenses, DeleteExpense, RemoveExpense, etc.).  That said, we also have implemented a class within the client (mobile app) that acts as an adapter, which implements asynchronous methods such as GetByIdAsync, GetAllAsync, DeleteAsync. Now, the only piece that's missing is the link between Crosslight and the adapter, which acts as a repository class for the view models. 


Do we need to implement  IEditableDataRepository interface with EditableListViewModelBase? We were looking at the MyInventory_MasterDetail sample, but turns out to be for local files. There is the MyInventory_WebAPI sample, but this was designed for the Crosslight's Enterprise architecture. Is there any samples that implement other REST services and/or WCF web services, aside from WebAPI? We would very much like to have such examples.


Again, many thanks! As always.

Any updates?

Posted: October 3, 2014 7:26 PM

Awesome!

Posted: September 18, 2014 11:24 PM

Wow! There's Crosslight 3 coming? Unbelievable, either you guys are fast or we started really late. Either way, this is really good news. We're just hoping to catch up to take advantage of the new features.

Kudos!

Hi Yudi,

Thanks for your reply. However, this issue has already been resolved. We've opened a new thread regarding VisibilityBinding for sections, not the individual properties.

Thanks!

Posted: September 18, 2014 4:54 AM

Hi Yudi,

Thanks for the update, however we are referring to VisibilityBinding for a section, not the individual properties.

Please advise. Thanks!

Hey Hans,

Thanks for the feedback. We apologize if we were not clear; however, we'd like to know if any service in Crosslight has a component (e.g. ReportingService) that allows an app to view PDF files from a cache or temporary folder on the device. That is to say, the PDF file has already been downloaded from a server. In general, PDF files can be downloaded from any web service, regardless if it's a Reporting Service from Crosslight or not (e.g. it could be SSRS). The question is... how can we let the user view the downloaded PDF file using Crosslight? Is this something that is already supported by using ReportViewModelBase, considering the View used by Crosslight to display the report is a WebView component?

As a workaround, we could actually create a custom xib file for iOS or custom axml for Android, etc. and use a WebView control or the like. With that, we could specify the location of the downloaded PDF file, a local Uri to be specific. But if this approach can be implemented with existing Crosslight services or components, then we will be very glad to know how. That is our hope for opening this thread.

Please advise. Thanks!

Never mind, we've updated to build 76 and it worked like a charm. The orientations were defined even before raising this concern. However, for some reason updating it to the latest nightly build seems to have fixed it.Thanks!

Yes, currently this is how it's implemented.

That should work. Thanks!

All times are GMT -5. The time now is 12:54 AM.
Previous Next