Qeb Archives: SharePoint hauv internet

Phem Exciting ntawv tshaj tawm

Kev tshajtawm tsis yog tiag kuv tshaj plaws, tab sis lub sij hawm no, Kuv pog tiag tiag txog ntawm cia li-launched Slalom loj kua SharePoint site. 

Ua Slalom noj kev haus thiab tswj cov Portals & Xyaum siv tswv yim.  Cov loj kua chaw yog "kuv" qhov chaw rau kuv siv cov ntawm no hauv New York.  Kuv twb mus ntev xav cov no. Kuv yog tseeb li ntau SP pro tus muaj xav txog tej yam zoo sib xws.  Pes tsawg zaus vim muaj peb ntsia peb lub tuam txhab ntawm pej xeem, los yog ib tug ntawm cov neeg muas zaub thiab pom lawv tsev nws ua thiab xwb paub thiab tias lawv yuav ua nws saum SP wishing?  Peb yeej paub tias SP tseem zoo zoo nkauj ntawm no zoo tshaj plaws, tab sis nws yuav tsis heev heev. 

Qhov tshij, tus worlds thaum kawg kws dlhos cia li ntawd rau kuv – SP Online yog pheej yig heev, Kuv muaj rau txoj kev pab thiab cov sij hawm txaus los yeej ua.

Nws yog ib qho lus tau tso amazing thiab thiab ib co kev uas yuav muab tso tawm rau pem hauv lub site.

Nyeem tag txog nws ntawm no thiab yog koj nyob nraum xav kom paub meej qab nws, Kuv zoo siab tshaj nrog tham txog nws.

Ntawm no yog cov kev txuas ntaub ntawv tshaj tawm: http://www.bigapplesharepoint.com/pages/View-An-Insight.aspx?BlogID=82 #O365

</kawg>

Yuav ua li cas: Configure tsev kuaj thiab tshuaj ntsuam cov kev pab uas muaj QUnit.js thiab Blanket.js rau ib qho chaw ua hauj lwm 365 SharePoint App

Intro

Twb tau kawm chav tsev kuaj thiab ntsuam xyuas cov kev pab tsis rau JavaScript nrog kuv ua hauj lwm hauv SharePoint app rau SharePoint hauv internet nyob rau hauv qhov chaw ua hauj lwm 365 Suite.  Cov cuab kev tshawb fawb paths coj kuv mus Qunit.js thiab txoj cai tom qab uas, mus Blanket.js.

QUnit cia kuv teeb tsev kuaj thiab koom rau hauv modules.  Ib tug module nws cia li yooj yim rau Teacher lwm yam kev kuaj. (Kuv tsis paub hais tias kuv yuav siv nws los siv yuav tsum, tab sis nws puas ua haujlwm rau kuv nyob deb thiaj nrog lub me me teeb ntawm kev ntsuam xyuas uas kuv tau deb deb li no txhais).

Blanket.js integrates nrog Qunit thiab nws yuav qhia kuv qhov tseeb kab ntawm JavaScript tau – thiab ntau ceeb tshaj – twb tsis tau tseg thaum khiav cov kev ntsuam xyuas.  Qhov no yog "los" – cov kab mob tseg yog them los ntawm txoj kev kuaj no thaum lwm tus uas tsis.

Teem mus kuaj mob zoo thiab saib cov kev pab them nqi, peb yuav txo tau qhov uas yuav ua kom cov code peb tau muab zais tsis xws luag.  Zoo sij hawm.

Qunit

Piv txwv tias yog koj muaj koj Studio uas koj siv qhov muag saib ib qhov teeb, pib los daus JavaScript pob ntawm http://qunitjs.com.  Ntxiv cov JavaScript thiab coj CSS koj cov tshuaj.  Mine looks li no:

image

Daim duab 1

Raws li koj tau pom, Kuv twb siv 1.13.0 thaum lub sij hawm uas kuv sau tau no blog tswg. Tsis txhob hnov qab ntxiv rau CSS daim download tau thiab kev pab.

Uas tawm hauv txoj kev, cov kauj ruam tom ntej yog los tsim tej yam xeem sam xauv nees thiab reference lub Qunit khoom.  Kuv yuav kuaj ib Rev muaj zog hauv ib tsab ntawv thov hu ua "QuizUtil.js" es kuv tsim ib nplooj hu ua "QuizUtil_test.html" thaum pom tias cov HTML:

image Daim duab 2

Ntawm no yog cov chaws:

<!DOCTYPE html>
<html xmlns= "http://xyoo 1999/xhtml www.w3.org/">
<lub taub hau>
    <npe>QuizUtil xeem nrog Qunit</npe>
    <txuas rel= "stylesheet" href="../CSS/qunit-1.13.0.CSS" />
    <tsab ntawv hom= "ntawv nyeem/javascript" src="QuizUtil.js" cov ntaub ntawv npog></tsab ntawv>
    <Script yam ="ntawv nyeem/javascript" src ="qunit-1.13.0.js"></tsab ntawv>
    <Script yam ="ntawv nyeem/javascript" src ="blanket.min.js"></tsab ntawv>

    <tsab ntawv>
        Module("getIDFromLookup");
        ntsuam xyuas("QuizUtil getIDFromLookupField", muaj nuj nqi () {
            Var goodValue = "1;#Paul Galvin";

            sib npaug(getIDFromLookupField(goodValue) + 1, 2), "Tus ID rau [" + goodValue + "] + 1 yuav tsum muaj rau 2";
            sib npaug(getIDFromLookupField(undefined), undefined, "Undefined input cav yuav rov raug undefined.");
            sib npaug(getIDFromLookupField(""), undefined, "Khoob input cav yuav tsum tau xa ib tus nqi uas undefined.");
            sib npaug(getIDFromLookupField("gobbledigood3-thq;dkvn ada;skfja sdjfbvubvqrubqer0873407t534piutheqw;vn"), undefined,"Yuav tsum nco ntsoov rov ib lub convertible no rau ib Integer");
            sib npaug(getIDFromLookupField("2;#ib txhia neeg"), "2", "Xyuas [2;#ib txhia neeg].");
            sib npaug(getIDFromLookupField("9834524;#tus nqi uas ntev"), "9834524", "Coob tus nqi kuaj.");
            notEqual(getIDFromLookupField("5;#leej twg los", 6), 6, "Kuaj ib notEqual (5 yog tsis sib npaug 6 rau cov qauv no: [5;#leej twg los]");

        });

        Module("htmlEscape");
        ntsuam xyuas("QuizUtil htmlEscape()", muaj nuj nqi () {
            sib npaug(htmlEscape("<"), "&LT;", "Escaping ib tug tsawg dua li tus neeg teb xov tooj ('<')");
            sib npaug(htmlEscape("<div hoob = yog muaj "someclass">Tej ntawv nyeem</div>"), "&LT;chav kawm ntawv div =&quot;someclass&quot;&gt;Tej ntawv nyeem&LT;/div&gt;", "Ntau xeem txoj hlua.");
        });

        Module("getDateAsCaml");
        ntsuam xyuas("QuizUtil getDateAsCaml()", muaj nuj nqi () {
            sib npaug(getDateAsCaml(tshiab Hnub tim("12/31/2013")), "2013-12-31T:00:00:00", "Kuaj coded ib hnub: [12/31/2013]");
            sib npaug(getDateAsCaml(tshiab Hnub tim("01/05/2014")), "2014-01-05T:00:00:00", "Kuaj coded ib hnub: [01/05/2014]");
            sib npaug(getDateAsCaml(tshiab Hnub tim("01/31/2014")), "2014-01-31T:00:00:00", "Kuaj coded ib hnub: [01/31/2014]");
            sib npaug(getTodayAsCaml(), getDateAsCaml(tshiab Hnub tim()), "getTodayAsCaml() yuav tsum siab sib npaug getDateAsCaml(Hnub tshiab())");
            sib npaug(getDateAsCaml("dev paus tus nqi"), undefined, "Sim tau hnub ntawm ib cov nqi dev paus.");
            sib npaug(getDateAsCaml(undefined), undefined, "Sim tau lub hnub lub [undefined] hnub.");
        });

        Module("getParameterByName");
        ntsuam xyuas("QuizUtil getParameterByName (los ntawm cov lus nug hlua)", muaj nuj nqi () {
            sib npaug(getParameterByName(undefined), undefined, "Sim nrhiav undefined parameter yuav tsum tau rov undefined.");
            sib npaug(getParameterByName(muaj "tsis nyob"), undefined, "Sim nrhiav parameter nqi thaum uas peb paub tias muaj tus parameter tsis nyob.");

        });

        Module("Ncuav qab zib");
        ntsuam xyuas("QuizUtil kua nplaum uas ntau zog.", muaj nuj nqi () {
            sib npaug(setCookie("sim", "1", -1), getCookieValue("sim"), "Tau ib cov kua nplaum uas kuv teem caij yuav tsum tau ua.");
            sib npaug(setCookie("anycookie", "1", -1), tseeb, "Qhov chaw kawm ib tug siv tau noj yuav tsum tau xa 'nws muaj tseeb'.");
            sib npaug(setCookie("npab kua nplaum uas lub npe !@#$%"%\^&*(()?/><.,", "1", -1), tseeb, "Qhov chaw kawm ib lub npe phem cov kua nplaum uas yuav tsum tau rov 'cuav'.");
            sib npaug(setCookie(undefined, "1", -1), undefined, "Raws li cov kua nplaum uas npe undefined.");
            sib npaug(getCookieValue(muaj "tsis nyob"), "", Muaj "kua nplaum uas tsis nyob ntawd.");
        });

    </tsab ntawv>
</lub taub hau>
<lub cev>
    <div tus ID= "qunit"></div>
    <div tus ID= "qunit-fixture"></div>

</lub cev>
</html>

Muaj ntau ntau yam zoj zis no:

  1. Referencing kuv code (QuizUtil.js)
  2. Referencing Qunity.js
  3. Defining tej modules (getIDFromLookup, Ncuav qab zib, thiab lwm tus)
  4. Muab ib <div> nws daim ID yog "qunit".

Ces, Kuv cia li rub tau cov nplooj ntawv no thiab koj mus muab tau tej yam zoo li no:

image

Daim duab 3

Yog qhov koj saib hla saum, koj tau xaiv ob peb, yog ob tug uas nthuav:

  • Hide dhau kev ntsuam xyuas: Cuab kev zoo nkauj.  Yuav pab tau koj qhov muag pom xwb lub teeb meem chaw thiab tsis muaj coob plaus.
  • Module: (hlauv): Qhov no yuav lim tau cov kev ntsuam xyuas pawg xwb cov kev ntsuam xyuas uas koj xav mus ua.

Ntawm kev tshuaj ntsuam lawv tus kheej – ob peb lus:

  • Nws yuav mus tsis tau hais tias koj tau sau koj cov cai xws tias nws yog testable ua tus xub place.  Siv cov cuab tam yuav pab tswj qhov kev qhuab qhia. Piv txwv, Kuv muaj ib tug ua haujlwm hu ua "getTodayAsCaml()”.  Qhov no tsis testable heev vim nws yuav siv sij hawm tsis sib cav uas input thiab kuaj kev koob pheej ntawm lawv, peb yuav tau lossi kho qhov chaws kuaj kom muaj kev cuam tshuam rau hnub tam sim no.  Kuv refactored ntawd los ntawm kev muab ib cov ntaub ntawv input parameter ces dua sau hnub thaum kuv xav hnub no CAML hom.
  • Qhov lub moj khaum Qunit ntaub ntawv rau qhov kev ntsuam xyuas nws tus kheej thiab no mas, robust zoo nkauj.  Nws yuav ua tau tej yam yooj yim xws li kuaj kev koob pheej ntawm lawv thiab tseem muaj nyiaj yug rau ajax style hu (ob leeg "tiag tiag" los mocked siv koj txoj kev mocker).
  • Yuav ua raws cov txheej txheem kuj forces koj xav mus txog ntug no – yuav ua cas nrog "undefined" lossis null dhau mus ua ib tug muaj nuj nqi.  Nws ua nws tuag yooj yim mus kuaj cov scenarios tawm.  Khoom zoo.

Cov kev pab uas muaj Blanket.js

Blanket.js complements Qunit los nrhiav lub txoos kab kev cai txim tuag thaum khiav koj kev ntsuam xyuas.  Nws integrates txoj cai rau hauv Qunit no, txawm ho yog ib tus tseem cais app, nws nicely plays – nws yeej zoo li nws yog ib tug seamless app.

Qhov no nws yog blanket.js rau hauv ntawv:

image Daim duab 4

image

Daim duab 5

(Koj yeej tau mus nias rau ntawm "Pab kom cov kev pab" checkbox rau saum [pom daim duab 3] kom niam no.)

Tus kab highlighted nyob hauv daim duab 5 tau tsis tau tseg los ntawm ib yam ntawm kuv qhov kev ntsuam xyuas, li ntawd, kuv yuav npaj ib txoj kev kuaj uas ua rau lawv rau txim tuag yog kuv xav tau kev pab tas nrho.

Tau ua hauj lwm los yog ua raws li cov kauj ruam nram blanket.js:

  1. Download tau nws tawm http://blanketjs.org/.
  2. Ntxiv rau koj qhov project
  3. Hloov koj nplooj ntawv kuaj sam xauv nees (QuizUtil_test.html hauv kuv tsev neeg) raws li nram no:
    1. Siv tus cai
    2. Kho koj <tsab ntawv> siv nyiam qhov no:
    <tsab ntawv hom= "ntawv nyeem/javascript" src="QuizUtil.js" cov ntaub ntawv npog></tsab ntawv>

Blanket.js picks los ntawm "cov ntaub ntawv npog" attribute thiab puas tau nws cov khawv koob.  Nws mus ua Qunit hooks, siab tus UI ntxiv qhov "Pab kom cov kev pab" option thiab voila!

Txoj kev (TL; DR)

Siv Qunit los mus sau koj cov raug kuaj.

  • Download tau nws
  • Ntxiv rau koj qhov project
  • Sau tau ib nplooj ntawv kuaj sam xauv nees
  • Ua kom muaj qhov kev ntsuam xyuas koj
    • Ib txhia ntawm koj cov cai ua testable refactor
    • Yuav muaj tswv yim!  Xav txog crazy, scenarios yeej ua thiab kuaj lawv lawm.

Siv cov blanket.js kom muaj kev pab them nqi

  • Xyuas kom tseeb tias Qunit ua hauj lwm
  • Download tau blanket.js thiab ntxiv mus rau koj qhov project
  • Ntxiv rau mus kuaj sam xauv nees phab:
    • Ntxiv ib siv mus blanket.js
    • Ntxiv "cov ntaub ntawv npog" attribute rau koj <tsab ntawv> lossis
  • Khiav koj cov kev kuaj Qunit.

Kuv yeej tsis ua yam no ua ntej thiab muaj ib co rudimentary khoom ua hauj lwm ib handful teev. 

Kev soj ntsuam zoo siab!

</kawg>

undefinedSubscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

BPOS 2010 thiab "Superset”

Kuv tau nyeem ib tug cov generic zoo nkauj blah xws li khoom ntawm BPOS (Microsoft lub txauv thiab SharePoint nyob rau hauv cov huab) thiab thankfully waded mus txog rau qhov kawg:

Saib raws lwm cov near-term deliverables, Microsoft yog commiting muab nyob rau hauv BPOS v.Next haiv PowerShell scripting ntawm tus PowerShell endpoint muaj nyob PowerShell Version 2. Authentication yuav ua tau los ntawm kev tawm lawv tus ID rau hauv internet, muaj ib cov xwm txaus nkaus xwb nyob thiaj yuav siv tau rau cov PowerShell thiab cov portal.Keane echoed cov xov lwm Microsoft execs muaj tau voicing nyob TechEd lub lim tiam no: Huab tuition, thaum lub sij hawm, yuav  ua ib tug superset muaj dab tsi nyob hauv-tsev. Tam sim no, tus nraud yeej muaj tseeb, Microsoft lub hauv internet ce ib subset ntawm lub zog nyob hauv tus kom muaj sib npaug software ntawm txhua yam khoom.

Tus notion tias huab yuav muaj cuab kav ntau tshaj nyob rau premise yog tshiab rau kuv. Kuv xav tias yeej muaj tseeb li cas uas yuav tau thaum kawg.  Yim counterintuitive rau kuv.  Kuv lig tau lub tswv yim yuav yog ntau lub tuam txhab uas muag nti khoom kom huab (los yog pib hauv cov huab) tab sis kuv xav txhua zaus tias lawv yeej ua li ntawd vim cov pro (admin yooj yim, SLAs, yam) nyob deb outweigh lub cons (txo functionality). 

Ib ntsis ntawm ib zaus believing tias huab offerings yuav tshaj rau prem tuition tabtom.  Tej tsev neeg yog ib qho nyuaj thiab nkawd li nws yuam yuav xaus thiaj li zoo SLA thiab yooj yim uas siv...

Kuv ces ntshe yuav noj kuv cov lus saum no.  Kuv nco ntsoov xav tias tsis muaj leej twg muaj peev xwm tsim tau ntau tshaj 650 mb ntawm cov ntaub ntawv no thiab yog li no, Daim CD ntawd yeej tsis mus yuav khees me ntsis lawm yog thaum.

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin

SharePoint hauv internet thiab InfoPath

Kuv yuav tau xeem tus neeg kom paub qhov no, tab sis cov SharePoint hauv internet (uas kuv yeej hnov tib neeg hais tias yog ib cov glorified WSS) txhawb kev pab InfoPath ntawv.  Li no cov khoom zoo nkauj haib, pheej xav tias tus IP FS yog ib NTXHUAB Enterprise feature thiab BPOS yog ib yam dab tsi zoo li $1.99/ hlis rau 10,000 cov neeg siv.  Tej zaum nws yog me ntsis ua ntau tshaj li uas.

Li ntawd, SharePoint Online defies txhais tau yooj yim.  Nws muaj no cov feature enterprise, tab sis tsis muaj tus saib anonymous (kev txhawb zog uas tej kev WSS).  Tej zaum koj yuav tau ua ib co khoom uas nrhiav nthuav (MOSS-ish, vim koj yuav txhais tau kawm ntawv qib scopes), tab sis, yog hais tias koj yuav mus saib tau hauv SSP, koj tsis tau xwb.  You can play the “on the one hand and on the other” game all night long with this product 🙂

Microsoft yuav yog them tsis tau tso ib tug tshiab version of SP Online ntawm ob peb lub hlis tom ntej.  Kuv xav tau dabtsi weird hybrid yuav tsum?

</kawg>

Subscribe rau kuv blog.

Raws li kuv nyob Twitter tom http://www.twitter.com/pagalvin