The mobile application developed using xpages and mobile extension lib. is loading extremely slow on mobile devices. To study the comparative statistics, another plain web HTML was served from Domino server. We found that the plain web HTML loading was very quick and the reason for slow loading was DOJO. Following is the snap shot of the mobile page which is getting loaded slowly.Any tips on how Dojo loading can be made faster?
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoParseOnLoad="true"
dojoTheme="true" xmlns:xe="http://www.ibm.com/xsp/coreex"
xmlns:xc="http://www.ibm.com/xsp/custom" >
<xp:this.resources>
<xp:dojoModule name="dojox.grid.DataGrid"></xp:dojoModule>
<xp:dojoModule name="dojox.data.JsonRestStore"></xp:dojoModule>
<xp:dojoModule name="dijit.form.Button"></xp:dojoModule>
In application properties XPages tab check [x] Use runtime optimized JavaScript and CSS resources. It will combine the Domino provided JS and CSS files into one file.
Could you please show network tab with number of requests from FF or Chrome?
There are could be much more requests for JS/CSS you simply do not see in HTML, rather they load dynamically.
Related
I will try to render some svg's in xamarin forms.
But the existing svg's are written in snap.svg.
Give it a nice why to render such svg's in xamarin forms?
Thank you.
Snap is used for animating svgs in web. You can't use the snap animations of svg in xamarin UI, because they are javascript animations. If you need just the svg, without the animation, you can export the inner svg (take a look here) and then use TwinTechs.SvgImage library for rendering cross-platform svgs in your xamarin.forms application.
EDIT 1:
You can load the svg into a WebView. I've created a sample project, which you can find here.
I've used XLabs's HybridWebView control. It allows to load html into web view. The rest is straightforward. You need to add HTML folder to iOS and Android projects (root project directory and Assets directory respectively). For iOS you need to copy HTML directory manually as described in HybridWebView doc
HybridWebViewRenderer.CopyBundleDirectory("HTML");
Then in your xaml page you declare the web view
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
x:Class="SvgSample.Views.SvgPage"
BackgroundColor="White">
<controls:HybridWebView
x:Name="webView"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand" />
</ContentPage>
And in xaml.cs file you need to load HTML into the web view in OnAppearing method (this is important, otherwise it will not work, again check out HybridWebView doc)
protected override void OnAppearing()
{
base.OnAppearing();
webView.LoadFromContent("HTML/guage.html");
}
I've tested for iOS and Android and it worked.
To develop websites I use domino designer v9.01 with OpenNTF Bootstrap extension library v14. I am new to IBM domino so have mercy …
The trouble I have is : While previewing XPage apps in Notes all controls, views etc. are there and looks as expected. But when I preview same XPage apps in a web browser (newest FireFox, newest Microsoft Edge) I get messy results. To be more specific, the amount of controls, views, etc. are there and they also work. But their expected design is messy. I cannot describe it better because I have never seen such pages before.
Finally the question is : Why is the presentation of XPage apps in Notes perfect while in a web browser not ?
UPDATE
Here are 2 screenshots to visualize the problem. First screenshot is from Notes showing expected UI. Second screenshot is from FireFox browser showing non-expected UI which i call "messy". The content you see is a simple example from a tutorial. So do not wonder about that.
The Extension Library plugin will also need to be installed on the server as well as into Domino Designer. The usual process for this is using an UpdateSite database, as documented here http://www-10.lotus.com/ldd/ddwiki.nsf/xpAPIViewer.xsp?lookupName=XPages+Extensibility+API#action=openDocument&res_title=XPages_Extension_Library_Deployment&content=apicontent
I am extremely new for mobile controls of xpages, according to the documentation, I have changes the setting in the "Xsp Properties page" selected the check-box "use mobile theme for Xpages with prefix: _m".
Then checked into the source tab and the status is
xsp.ajax.renderwholetree=false
xsp.error.page.default=true
xsp.library.depends=com.ibm.xsp.extlib.library,com.ibm.xsp.extlibx.library
xsp.persistence.mode=file
xsp.resources.aggregate=true
xsp.theme=oneuiv2.1
xsp.theme.mobile.pagePrefix=m_
Then I have stated with the test xpages using mobile controls The code for test page is
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xe:singlePageApp id="singlePageApp1"
selectedPageName="topicList">
<xe:appPage id="appPage2" pageName="topicList">
<xe:dataView id="dataView1">
<xe:this.data>
<xp:dominoView var="view1" viewName="topic"></xp:dominoView>
</xe:this.data>
<xe:this.summaryColumn>
<xe:viewSummaryColumn columnName="subject"></xe:viewSummaryColumn>
</xe:this.summaryColumn>
<xe:this.extraColumns>
<xe:viewExtraColumn columnName="MainContent"></xe:viewExtraColumn>
<xe:viewExtraColumn></xe:viewExtraColumn>
</xe:this.extraColumns>
</xe:dataView>
<xe:djxmHeading id="djxmHeading1" label="Topics"></xe:djxmHeading></xe:appPage>
<xe:appPage id="appPage1" pageName="topicDetails">
<xe:djxmHeading id="djxmHeading2" label="Details"
back="Back" moveTo="topicList">
</xe:djxmHeading></xe:appPage>
</xe:singlePageApp>
</xp:view>
No errors shows in designer and when i am trying see the result in safari browser or any browser it returns a blank page.
I am not getting exactly what I an missing,and why I am not able see the page layout in browser.
Any suggestion will be helpful for me,
I could see the result as
Edit 2:error caught in console
Best guess is that you haven't included the "m_" prefix on the name of the XPage. What did you call the XPage? It should be something like m_thexpage, thus the XPages runtime sees the m_ prefix and knows to render the page using the mobile theme. If it's completely blank, it also suggests there are no documents in the view.
From the comments below:
Server version is 8.5 and the extension library is 9.0 – Ajit Hogade
I'm afraid you can't install a 9.0 extlib on top of an 8.5 server. The 9.0 extlib is dependent on features from the 9.0 xpages runtime. To use 9.0 extlib, you will need to upgrade your domino server to match. This explains why the mobile stuff isn't working for you.
finally i found the error in browser console which image i have uploaded in new the edit. Agree with the comment about the version difference,but as far, I am using this I found no problem with the extension library controls with works perfectly fine in the browser, the only issue I had with mobile controls. – Ajit Hogade 7 mins ago
You are lucky not to have experienced other problems. The 9.0 ExtLib expects to have Dojo 1.8.1, which is part of the 9.0 domino server. The 8.5 domino server has a much older version, 8.5.3 = dojo 1.6.1, 8.5.2 = dojo 1.4.3. The mobile controls are heavily dependent on dojo, so the version mis-match is undoubtedly the root of your problem, illustrated by the error you found in the browser console.
Mobile controls are specifically for browsers on mobile devices. The XPages runtime can identify the device requesting the page and use controls accordingly. So they're unlikely to render for desktop browsers.
Use a user agent switcher to test mobile controls in a desktop browser. However, bear in mind that this does not guarantee complete fidelity with the appropriate mobile device's browser.
Is there a way to save an html file that still contains the user interactions of jQuery and JavaScript?
Because JavaScript and CSS are client-side (meaning they run in the browser), yes, you can save the page and use it off-line.
If the JavaScript and CSS are embedded within the HTML then you can have it work as an all-in-one page.
If you right-click on a page and "view source" you can easily download the code.
Note that any server-side interaction (such as PHP, Java, etc) will not work this way.
The xPage app was developed and compiled using 851 designer by someone else...
Were suppose to be used inside Notes Client.
Only two of my users when they open the xpage app in the Notes Client 853FP5 standard config on win7 everything displays and no error however it wasn't in xpage UI, instead it looks like some domino view being loaded in a web browser. but all xpage buttons and links are working and displayed. Just the not xpage UI.
If I try to load the app in a web browser, all seems to load fine.
Any ideas? as no other user has got the same issue. If it is an issue with win7, then they are all on win7 though, Or any suggestions in terms of where to start from to debug this issue?
Many thanks
You mention that it's not the "xpage UI" but that "xpage buttons and links are working". It sounds like a caching issue for the CSS files. Try the keyboard shortcut Ctrl-Shift-Delete to clear the local cache.
Source: http://ypastov.blogspot.dk/2013/08/xpinc-clearing-cache.html