How does one populate an app with content when using a front end javascript framework?

For the last month or so I have been struggling with this question. One of the next logical steps in my studies of front end development is to learn how to use a JavaScript framework such as Angular or Vue.js. However, I feel blocked by this one issue that comes to mind.

How does one populate a website with content (say from a database) with a framework like Vue or Angular?

Based on my current research I have come to the conclusion that the only way to do this would be by loading the page and then using client-side JavaScript to request the relevant data after the initial load.

This, to me, seems very inefficient.

Is there any way to render the page beforehand while still keeping all the features of the frontend framework?

Any thought framework to decide between section vs page?

Are there any patterns one should follow to help them decide if a topic should should go as a separate page on a website or should it be a section under an existing page?

e.g: For my SaaS @ https://divshow.bytebeacon.com .. When you login .. I have a bunch of things shoved under the “Accounts” page. There are profile details in there, basic stats and billing. I feel like I should separate out Billing section into a separate page (it seems like a high value page), but I can keep profile info and basic stats together. I can also split “Stats” in its own page, but now I’m starting to feel there might be too many pages (I wanted to keep low number of clicks for the user as well).

How do you think about a topic getting its own page vs being placed as a section in another page? Also what would your advice be on my “Accounts” page?

Do PHP redirect information disclosure also apply to other languages or framework?

When redirecting using header("Location MyPage.php"); in PHP, any code present after will be executed. So, if you’re using this as a way to avoid user accessing pages where they should be logged in, the content of the page will still be processed and sent to the client. Using a proxy, you can set that despite returning a 302 error code, you’ll also get the content of the page.

My question is, what other languages or framework have this issue ?

SCSS in Sharepoint Framework Library Project

Looking for the proper way of constructing my projects. I decided to use 1 project per web part however is have a number of classes and react components that are common to all projects. So I created a library project and moved my common classes there. I used npm link to link both projects and all seems to be working well. My question is around SCSS files. Again I have a few that are common across all webparts. I know I can use the cdn to serve these files but i was wondering if i could use my current library project. If so, how do i “export” the SCSS as i do my ts and tsx files in the index.js? Any help is greatly appreciated

SharePoint 2019 Standard vs. Enterprise, Updates / Release / Patch / Versions and the SharePoint Framework Releases

We have an SP2019 test farm running SharePoint Server 2019 Standard, version 16.0.10351.20000 (October 2019). I have a few questions regarding compatibility between SPFX development and SP2019 on-premise:

  1. Is it important to keep the SP2019 environment updated with the latest monthly release in order to ensure compatibility with the latest version of the SharePoint Framework?

  2. Is there any guidance regarding development targeting SP2019 standard edition vs. enterprise (article, blog post)?

  3. Some on-line posts state that SPFX should be kept at version 1.4.1 for SP2019. Is this still true?

  4. Does anyone have any experience regarding possible deployment issues when development is performed on SharePoint Online? Development environment is O365.

Thanks in advance!

Jest with SharePoint Framework. SyntaxError: Unexpected token export

I’m trying to do tests on an SPFx project with Jest and Enzyme. I have configured the environment using Andrew Connel’s preset to test my solution with React and Typescript.

After run ‘npm test’ I’ve encountered this error on a component that uses Dropdown of Office Fabric UI component:

<mylocalpath>\node_modules\office-ui-fabric-react\lib\components\Dropdown\index.js:1     ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export * from './Dropdown';                                                                                              ^^^^^^      SyntaxError: Unexpected token export 

Can you suggest me the right configuration of Jest for these type of imports?

Buscar una palabra o un conjunto de palabras en ION-CARD — IONIC FRAMEWORK

Apreciados compañeros programadores de IONIC FRAMEWORK . Por favor si alguien me puede sacar de un apuro, de cómo hago a través de un Ion-searchbar o un botón de busqueda u otra forma; poder buscar texto en un solo Ion-card o un conjunto de Ion-card. Y que cuando lo encuentre, este texto quede seleccionado. Muy similar como cuando tenemos una web abierta y presionamos control + f y buscamos un texto en particular en el navegador.

De antemano muchas gracias por su valiosa ayuda…

Windows Forms decrypt password SQL Entity Framework

tengo la siguiente cuestión, necesito hacer un proyecto en windows forms que consulte datos de una base de SQL que fue generada por Entity Framework, entonces estoy tratando de comparar contraseñas entre la que ingreso por WF con la que tengo en la base de datos, la cuestion está en que EF encripta los datos de la contraseña y por tanto si lo tengo que comparar pues, necesito desencriptarlo. Esto es una suposición, no se haya otra forma de comparar estos datos. Y pues este es el código que tengo

public partial class MainWindow : Window {     private Models.SecurityController _security;     public MainWindow()     {         InitializeComponent();         _security = new Models.SecurityController();     }      private void Button_Click(object sender, RoutedEventArgs e)     {         var email = EmailInput.Text;         var pass = PassInput.Password;         email = email.Replace(" ", "");         if (email == "" )         {             EmailInput.Focus();             Errorlbl.Content = "Por favor utiliza un mail valido";         }         else if (pass == "")         {             PassInput.Focus();             Errorlbl.Content = "Por favor utiliza una contraseña";         }         else if (email != null && pass != null)         {             using (DBEnt db = new DBEnt())             {                 var item = db.AspNetUsers.Where(u => u.Email.Equals(email)).FirstOrDefault();                  if (item == null)                 {                     Errorlbl.Content = "Usuario mail invalido";                 }                 else {                     Errorlbl.Content = "Usuario valido";                 }                  var query =                 db.AspNetUsers.Where(u => u.Email.Equals(email)).FirstOrDefault();                 var hashedpassword = query.PasswordHash;                 var unhashed = _security.Decrypt(pass, hashedpassword);             }         }     } } 

hasta este punto hashedpassword me devuelve null

Y todo esta es la clase SecurityController

class SecurityController {     public string Encrypt(string key, string data)     {         string encData = null;         byte[][] keys = GetHashKeys(key);          try         {             encData = EncryptStringToBytes_Aes(data, keys[0], keys[1]);         }         catch (CryptographicException) { }         catch (ArgumentNullException) { }          return encData;     }      public string Decrypt(string key, string data)     {         string decData = null;         byte[][] keys = GetHashKeys(key);          try         {             decData = DecryptStringFromBytes_Aes(data, keys[0], keys[1]);         }         catch (CryptographicException) { }         catch (ArgumentNullException) { }          return decData;     }      private byte[][] GetHashKeys(string key)     {         byte[][] result = new byte[2][];         Encoding enc = Encoding.UTF8;          SHA256 sha2 = new SHA256CryptoServiceProvider();          byte[] rawKey = enc.GetBytes(key);         byte[] rawIV = enc.GetBytes(key);          byte[] hashKey = sha2.ComputeHash(rawKey);         byte[] hashIV = sha2.ComputeHash(rawIV);          Array.Resize(ref hashIV, 16);          result[0] = hashKey;         result[1] = hashIV;          return result;     }      //source: https://msdn.microsoft.com/de-de/library/system.security.cryptography.aes(v=vs.110).aspx     private static string EncryptStringToBytes_Aes(string plainText, byte[] Key, byte[] IV)     {         if (plainText == null || plainText.Length <= 0)             throw new ArgumentNullException("plainText");         if (Key == null || Key.Length <= 0)             throw new ArgumentNullException("Key");         if (IV == null || IV.Length <= 0)             throw new ArgumentNullException("IV");          byte[] encrypted;          using (AesManaged aesAlg = new AesManaged())         {             aesAlg.Key = Key;             aesAlg.IV = IV;              ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);              using (MemoryStream msEncrypt = new MemoryStream())             {                 using (CryptoStream csEncrypt =                         new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))                 {                     using (StreamWriter swEncrypt = new StreamWriter(csEncrypt))                     {                         swEncrypt.Write(plainText);                     }                     encrypted = msEncrypt.ToArray();                 }             }         }         return Convert.ToBase64String(encrypted);     }      //source: https://msdn.microsoft.com/de-de/library/system.security.cryptography.aes(v=vs.110).aspx     private static string DecryptStringFromBytes_Aes(string cipherTextString, byte[] Key, byte[] IV)     {         byte[] cipherText = Convert.FromBase64String(cipherTextString);          if (cipherText == null || cipherText.Length <= 0)             throw new ArgumentNullException("cipherText");         if (Key == null || Key.Length <= 0)             throw new ArgumentNullException("Key");         if (IV == null || IV.Length <= 0)             throw new ArgumentNullException("IV");          string plaintext = null;          using (Aes aesAlg = Aes.Create())         {             aesAlg.Key = Key;             aesAlg.IV = IV;              ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);              using (MemoryStream msDecrypt = new MemoryStream(cipherText))             {                 using (CryptoStream csDecrypt =                         new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))                 {                     using (StreamReader srDecrypt = new StreamReader(csDecrypt))                     {                         plaintext = srDecrypt.ReadToEnd();                     }                 }             }         }         return plaintext;     } }    

Quiza me estoy complicando mucho, alguien sabe como puedo hacer esto mejor o si lo estoy haciendo bien?

SharePoint Framework v1.1.0 requirement

I want to build my first spfx page on our SP2016 on-premise environment. Could you advice what is the requirement? I mentioned v1.1.0 because later version are not supported by SP2016 according to this article. However there is no further explanation on how to setup SP2016 dev environment.

May I know, which version I required?

  • NodeJS
  • Yeoman
  • Gulp
  • NPM
  • SharePoint yeoman generator

Another question, why Microsoft make on-premise administrator so frustrated?